Skip to content

Meta Service configuration

Nebula Graph provides two initial configuration files for the Meta Service: nebula-metad.conf.default and nebula-metad.conf.production. You can use them in different scenarios. The default file path is /usr/local/nebula/etc/.

How to use the configuration files

The Meta Service gets its configuration from the nebula-metad.conf file. You have to remove the suffix .default or .production from an initial configuration file for the Meta Service to apply the configuration defined in it.

If you have modified the configuration in the file and want new configuration to take effect, add --local_conf=true at the top of the file. Otherwise, Nebula Graph reads the cached configuration.

About parameter values

If a parameter is not set in the configuration file, Nebula Graph uses the default value.

Note

The default value of a parameter in Nebula Graph may be different from the predefined value in the .default and .production files.

The predefined parameters in nebula-metad.conf.default and nebula-metad.conf.production are different. And not all parameters are predefined. This topic uses the parameters in nebula-metad.conf.default.

Nebula Graph provides two initial configuration files for the Meta Service: nebula-metad.conf.default and nebula-metad.conf.production. You can use them in different scenarios. The default file path is /usr/local/nebula/etc/.

Basic configurations

Name Predefine Value Descriptions
daemonize true When set to true, the process is a daemon process.
pid_file pids/nebula-metad.pid File to host the process ID.
timezone_name - Specifies the Nebula Graph time zone. This parameter is not predefined in the initial configuration files. You can manually set it if you need it. The system default value is UTC+00:00:00. For the format of the parameter value, see Specifying the Time Zone with TZ. For example, --timezone_name=CST-8 represents the GMT+8 time zone.

Note

  • While inserting time-type property values except timestamps, Nebula Graph transforms them to a UTC time according to the time zone specified with the timezone_name parameter in the configuration files. The time-type values returned by nGQL queries are all UTC time.
  • timezone_name is only used to transform the data stored in Nebula Graph. Other time-related data of the Nebula Graph processes still uses the default time zone of the host, such as the log printing time.

Logging configurations

Name Predefine Value Descriptions
log_dir logs Directory to the Meta Service log. We recommend that you put logs on a different hard disk from the data_path.
minloglevel 0 Specifies the minimum log level. Available values are 0 (INFO), 1 (WARNING), 2 (ERROR), and 3 (FATAL). We suggest that you set minloglevel to 0 for debugging and 1 for production. When you set it to 4, Nebula Graph does not print any logs.
v 0 Specifies the verbose log level. Available values are 0-4. The larger the value, the more verbose the log.
logbufsecs 0 Specifies the maximum time to buffer the logs. The configuration is measured in seconds.
stdout_log_file metad-stdout.log Specifies the filename for the stdout log.
stderr_log_file metad-stderr.log Specifies the filename for the stderr log.
stderrthreshold 2 Specifies the minimum level to copy the log messages to stderr.

Networking configurations

Name Predefine Value Descriptions
meta_server_addrs 127.0.0.1:9559 Specifies the IP addresses and ports of all Meta Services. Separate multiple addresses with commas.
local_ip 127.0.0.1 Specifies the local IP for the Meta Service.
port 9559 Specifies RPC daemon listening port. The external port for the Meta Service is predefined to 9559. The internal port is predefined to port + 1, i.e., 9560. Nebula Graph uses the internal port for multi-replica interactions.
ws_ip 0.0.0.0 Specifies the IP address for the HTTP service.
ws_http_port 19559 Specifies the port for the HTTP service.
ws_h2_port 19560 Specifies the port for the HTTP2 service.
heartbeat_interval_secs 10 Specifies the default heartbeat interval in seconds. Make sure the heartbeat_interval_secs values for all services are the same, otherwise Nebula Graph CANNOT work normally.

Note

We recommend that you use the real IP address in your configuration because sometimes 127.0.0.1 can not be parsed correctly.

Storage configurations

Name Predefine Value Descriptions
data_path data/meta (i.e. /usr/local/nebula/data/meta/) Directory for cluster metadata persistence

Misc configurations

Name Predefine Value Descriptions
default_parts_num 100 Specifies the default partition number when you create a new graph space.
default_replica_factor 1 Specifies the default replica factor number when you create a new graph space.

RocksDB options

Name Predefine Value Descriptions
rocksdb_wal_sync true Enable or disable RocksDB WAL synchronization. Available values are true (enable) and false (disable).

Last update: April 22, 2021
Back to top