In this section, we learn about how we can configure Grakn to have it tailored to our production and development needs.
Prior to starting, the Grakn Server and Console read configurations from a file named
grakn.properties. The location of this file varies based on how Grakn has been installed.
If installed via Homebrew, we can find this file in the following directory.
If downloaded manually, we can find the configuration file in the
conf directory inside the unzipped folder.
The default keyspace
knowledge-base.default-keyspace config sets the default keyspace that the Graql Console falls back on when no
--keyspace option is specified. The default value is
Mitigating the supernode problem
Grakn uses sharding to mitigate against supernodes. The
knowledge-base.sharding-threshold config specifies the number of instances after which Grakn shards any type node. A larger threshold increases runtime as a Grakn knowledge graph grows while decreasing the likelihood of supernodes. A smaller threshold creates supernodes more frequently. The default value is
Where data is stored
data-dir config sets the path to the directory where the data for all keyspaces gets stored. The default value is
Host and port
grpc.port configs set the IP address and the port on which the Grakn Server listens to. The default values are
Where logs are stored
log.dirs config holds the path to the directory where the logs get stored. The default value is
Verbosity of the logs
log.level config specifies the verbosity of the logs. The default value is
INFO and the options are as follows:
ERROR: critical errors indicating that the application has failed.
WARN: errors that do not affect the overall running of the application.
INFO: minimally verbose, including Grakn server lifecycle events.
DEBUG: verbose, non-production use, server task lifecycle events.
TRACE: extraordinarily verbose, including graql query traversal paths, extra task lifecycle events and Kafka consumer offsets.
storage.connection-timeout config holds the maximum number of milliseconds that Grakn waits for a response from the storage backend before terminating the request. The default value is