Project: GreptimeDB (App Definition and Development / Database)
File: config.md

- - | Key | Type | Default | Descriptions | | | --| - | -- | | `mode` | String | `standalone` | The running mode of the datanode. It can be `standalone` or `distributed`. | | `enable_telemetry` | Bool | `true` | Enable telemetry to collect anonymous usage data. | | `default_timezone` | String | `None` | The default timezone of the server. | | `http` | -- | -- | The HTTP server options. | | `http.addr` | String | `127.0.0.1:4000` | The address to bind the HTTP server. | | `http.timeout` | String | `30s` | HTTP request timeout. | | `http.body_limit` | String | `64MB` | HTTP request body limit.<br/>Support the following units are supported: `B`, `KB`, `KiB`, `MB`, `MiB`, `GB`, `GiB`, `TB`, `TiB`, `PB`, `PiB`. | | `grpc` | -- | -- | The gRPC server options. | | `grpc.addr` | String | `127.0.0.1:4001` | The address to bind the gRPC server. | | `grpc.runtime_size` | Integer | `8` | The number of server worker threads. | | `mysql` | -- | -- | MySQL server options. | | `mysql.enable` | Bool | `true` | Whether to enable. | | `mysql.addr` | String | `127.0.0.1:4002` | The addr to bind the MySQL server. | | `mysql.runtime_size` | Integer | `2` | The number of server worker threads. | | `mysql.tls` | -- | -- | -- | | `mysql.tls.mode` | String | `disable` | TLS mode, refer to https://www.postgresql.org/docs/current/libpq-ssl.html<br/>- `disable` (default value)<br/>- `prefer`<br/>- `require`<br/>- `verify-ca`<br/>- `verify-full` | | `mysql.tls.cert_path` | String | `None` | Certificate file path. | | `mysql.tls.key_path` | String | `None` | Private key file path. | | `mysql.tls.watch` | Bool | `false` | Watch for Certificate and key file change and auto reload | | `postgres` | -- | -- | PostgresSQL server options. | | `postgres.enable` | Bool | `true` | Whether to enable | | `postgres.addr` | String | `127.0.0.1:4003` | The addr to bind the PostgresSQL server. | | `postgres.runtime_size` | Integer | `2` | The number of server worker threads. | | `postgres.tls` | -- | -- | PostgresSQL server TLS options, see `mysql_options.tls` section. | | `postgres.tls.mode` | String | `disable` | TLS mode. | | `postgres.tls.cert_path` | String | `None` | Certificate file path. | | `postgres.tls.key_path` | String | `None` | Private key file path. | | `postgres.tls.watch` | Bool | `false` | Watch for Certificate and key file change and auto reload | | `opentsdb` | -- | -- | OpenTSDB protocol options. | | `opentsdb.enable` | Bool | `true` | Whether to enable OpenTSDB put in HTTP API. | | `influxdb` | -- | -- | InfluxDB protocol options. | | `influxdb.enable` | Bool | `true` | Whether to enable InfluxDB protocol in HTTP API. | | `prom_store` | -- | -- | Prometheus remote storage options | | `prom_store.enable` | Bool | `true` | Whether to enable Prometheus remote write and read in HTTP API. | | `promstore.withmetric_engine` | Bool | `true` | Whether to store the data from Prometheus remote write in metric engine. | | `wal` | -- | -- | The WAL options. | | `wal.provider` | String | `raftengine` | The provider of the WAL.<br/>- `raftengine`: the wal is stored in the local file system by raft-engine.<br/>- `kafka`: it's remote wal that data is stored in Kafka. | | `wal.dir` | String | `None` | The directory to store the WAL files.<br/>It's only used when the provider is

| | `wal.filesize` | String | `256MB` | The size of the WAL segment file.<br/>**It's only used when the provider is `raftengine`. | | `wal.purgethreshold` | String | `4GB` | The threshold of the WAL size to trigger a flush.<br/>**It's only used when the provider is `raftengine`. | | `wal.purgeinterval` | String | `10m` | The interval to trigger a flush.<br/>**It's only used when the provider is `raftengine`. | | `wal.readbatchsize` | Integer | `128` | The read batch size.<br/>It's only used when the provider is `raft_engine`. | | `wal.syncwrite` | Bool | `false` | Whether to use sync write.<br/>**It's only used when the provider is `raftengine`. | | `wal.enablelogrecycle` | Bool | `true` | Whether to reuse logically truncated log files.<br/>It's only used when the provider is `raft_engine`. | | `wal.prefilllogfiles` | Bool | `false` | Whether to pre-create log files on start up.<br/>It's only used when the provider is `raft_engine`. | | `wal.syncperiod` | String | `10s` | Duration for fsyncing log files.<br/>**It's only used when the provider is `raftengine`. | | `wal.broker_endpoints` | Array | -- | The Kafka broker endpoints.<br/>It's only used when the provider is `kafka`. | | `wal.maxbatchsize` | String | `1MB` | The max size of a single producer batch.<br/>Warning: Kafka has a default limit of 1MB per message in a topic.<br/>It's only used when the provider is `kafka`. | | `wal.linger` | String | `200ms` | The linger duration of a kafka batch producer.<br/>It's only used when the provider is `kafka`. | | `wal.consumerwaittimeout` | String | `100ms` | The consumer wait timeout.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_init` | String | `500ms` | The initial backoff delay.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_max` | String | `10s` | The maximum backoff delay.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_base` | Integer | `2` | The exponential backoff rate, i.e. next backoff = base current backoff.<br/>It's only used when the provider is `kafka`*. | | `wal.backoff_deadline` | String | `5mins` | The deadline of retries.<br/>It's only used when the provider is `kafka`. | | `metadata_store` | -- | -- | Metadata storage options. | | `metadatastore.filesize` | String | `256MB` | Kv file size in bytes. | | `metadatastore.purgethreshold` | String | `4GB` | Kv purge threshold. | | `procedure` | -- | -- | Procedure storage options. | | `procedure.maxretrytimes` | Integer | `3` | Procedure max retry time. | | `procedure.retry_delay` | String | `500ms` | Initial retry delay of procedures, increases exponentially | | `storage` | -- | -- | The data storage options. | | `storage.data_home` | String | `/tmp/greptimedb/` | The working home directory. | | `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. | | `storage.cache_path` | String | `None` | Cache configuration for object storage such as 'S3' etc.<br/>The local file cache directory. | | `storage.cache_capacity` | String | `None` | The local file cache capacity in bytes. | | `storage.bucket` | String | `None` | The S3 bucket name.<br/>It's only used when the storage type is `S3`, `Oss` and `Gcs`. | |

| String | `None` | The S3 data will be stored in the specified prefix, for example, `s3://${bucket}/${root}`.<br/>It's only used when the storage type is `S3`, `Oss` and `Azblob`. | | `storage.accesskeyid` | String | `None` | The access key id of the aws account.<br/>It's highly recommended to use AWS IAM roles instead of hardcoding the access key id and secret key.<br/>It's only used when the storage type is `S3` and `Oss`. | | `storage.secretaccesskey` | String | `None` | The secret access key of the aws account.<br/>It's highly recommended to use AWS IAM roles instead of hardcoding the access key id and secret key.<br/>It's only used when the storage type is `S3`. | | `storage.accesskeysecret` | String | `None` | The secret access key of the aliyun account.<br/>It's only used when the storage type is `Oss`. | | `storage.account_name` | String | `None` | The account key of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.account_key` | String | `None` | The account key of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.scope` | String | `None` | The scope of the google cloud storage.<br/>It's only used when the storage type is `Gcs`. | | `storage.credential_path` | String | `None` | The credential path of the google cloud storage.<br/>It's only used when the storage type is `Gcs`. | | `storage.container` | String | `None` | The container of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.sas_token` | String | `None` | The sas token of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.endpoint` | String | `None` | The endpoint of the S3 service.<br/>It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`. | | `storage.region` | String | `None` | The region of the S3 service.<br/>It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`. | | `[[region_engine]]` | -- | -- | The region engine options. You can configure multiple region engines. | | `region_engine.mito` | -- | -- | The Mito engine options. | | `regionengine.mito.numworkers` | Integer | `8` | Number of region workers. | | `regionengine.mito.workerchannel_size` | Integer | `128` | Request channel size of each worker. | | `regionengine.mito.workerrequestbatchsize` | Integer | `64` | Max batch size for a worker to handle requests. | | `regionengine.mito.manifestcheckpoint_distance` | Integer | `10` | Number of meta action updated to trigger a new checkpoint for the manifest. | | `regionengine.mito.compressmanifest` | Bool | `false` | Whether to compress manifest and checkpoint file by gzip (default false). | | `regionengine.mito.maxbackground_jobs` | Integer | `4` | Max number of running background jobs | | `regionengine.mito.autoflush_interval` | String | `1h` | Interval to auto flush a region if it has not flushed yet. | | `regionengine.mito.globalwritebuffersize` | String | `1GB` | Global write buffer size for all regions. If not set, it's default to 1/8 of OS memory with a max limitation of 1GB. | | `regionengine.mito.globalwritebufferrejectsize` | String | `2GB` | Global write buffer size threshold to reject write requests. If not set, it's default to 2 times of `globalwritebuffersize` | | `regionengine.mito.sstmetacachesize` | String | `128MB` | Cache size for SST metadata. Setting it to 0 to disable the cache.<br/>If not set, it's default to 1/32 of OS memory with a max limitation of 128MB. | | `regionengine.mito.vectorcache_size` | String | `512MB` | Cache size for vectors and arrow arrays. Setting it to 0 to disable the

not set, it's default to 1/16 of OS memory with a max limitation of 512MB. | | `regionengine.mito.pagecache_size` | String | `512MB` | Cache size for pages of SST row groups. Setting it to 0 to disable the cache.<br/>If not set, it's default to 1/16 of OS memory with a max limitation of 512MB. | | `regionengine.mito.sstwritebuffersize` | String | `8MB` | Buffer size for SST writing. | | `regionengine.mito.scanparallelism` | Integer | `0` | Parallelism to scan a region (default: 1/4 of cpu cores).<br/>- `0`: using the default value (1/4 of cpu cores).<br/>- `1`: scan in current thread.<br/>- `n`: scan in parallelism n. | | `regionengine.mito.parallelscanchannelsize` | Integer | `32` | Capacity of the channel to send data from parallel scan tasks to the main task. | | `regionengine.mito.allowstale_entries` | Bool | `false` | Whether to allow stale WAL entries read during replay. | | `regionengine.mito.invertedindex` | -- | -- | The options for inverted index in Mito engine. | | `regionengine.mito.invertedindex.createonflush` | String | `auto` | Whether to create the index on flush.<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.createoncompaction` | String | `auto` | Whether to create the index on compaction.<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.applyonquery` | String | `auto` | Whether to apply the index on query<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.memthresholdon_create` | String | `64M` | Memory threshold for performing an external sort during index creation.<br/>Setting to empty will disable external sorting, forcing all sorting operations to happen in memory. | | `regionengine.mito.invertedindex.intermediatepath` | String | `""` | File system path to store intermediate files for external sorting (default `{datahome}/index_intermediate`). | | `region_engine.mito.memtable` | -- | -- | -- | | `regionengine.mito.memtable.type` | String | `timeseries` | Memtable type.<br/>- `timeseries`: time-series memtable<br/>- `partitiontree`: partition tree memtable (experimental) | | `regionengine.mito.memtable.indexmaxkeyspershard` | Integer | `8192` | The max number of keys in one shard.<br/>Only available for `partitiontree` memtable. | | `regionengine.mito.memtable.datafreezethreshold` | Integer | `32768` | The max rows of data inside the actively writing buffer in one shard.<br/>Only available for `partitiontree` memtable. | | `regionengine.mito.memtable.forkdictionarybytes` | String | `1GiB` | Max dictionary bytes.<br/>Only available for `partitiontree` memtable. | | `logging` | -- | -- | The logging options. | | `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. | | `logging.level` | String | `None` | The log level. Can be `info`/`debug`/`warn`/`error`. | | `logging.enableotlptracing` | Bool | `false` | Enable OTLP tracing. | | `logging.otlp_endpoint` | String | `None` | The OTLP tracing endpoint. | | `logging.append_stdout` | Bool | `true` | Whether to append logs to stdout. | | `logging.tracingsampleratio` | -- | -- | The percentage of tracing will be sampled and exported.<br/>Valid range `[0, 1]`, 1 means all traces are sampled, 0 means all traces are not sampled, the default value is 1.<br/>ratio > 1 are treated as 1. Fractions < 0 are treated as 0 | | `logging.tracingsampleratio.default_ratio` | Float | `1.0` | -- | | `export_metrics` | -- | -- | The datanode can export its metrics and send to Prometheus compatible service (e.g. send to `greptimedb` itself) from remote-write API.<br/>This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape. | | `export_metrics.enable` | Bool | `false` | whether enable export metrics. | | `exportmetrics.writeinterval` | String | `30s` | The interval of export metrics. | | `exportmetrics.selfimport` | -- | -- | For `standalone` mode, `self_import` is recommend to collect metrics generated by itself | |

| String | `None` | -- | | `exportmetrics.remotewrite` | -- | -- | -- | | `exportmetrics.remotewrite.url` | String | `""` | The url the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=information_schema`. | | `exportmetrics.remotewrite.headers` | InlineTable | -- | HTTP headers of Prometheus remote-write carry. | | `tracing` | -- | -- | The tracing options. Only effect when compiled with `tokio-console` feature. | | `tracing.tokioconsoleaddr` | String | `None` | The tokio console address. | | Key | Type | Default | Descriptions | | | --| - | -- | | `mode` | String | `standalone` | The running mode of the datanode. It can be `standalone` or `distributed`. | | `default_timezone` | String | `None` | The default timezone of the server. | | `heartbeat` | -- | -- | The heartbeat options. | | `heartbeat.interval` | String | `18s` | Interval for sending heartbeat messages to the metasrv. | | `heartbeat.retry_interval` | String | `3s` | Interval for retrying to send heartbeat messages to the metasrv. | | `http` | -- | -- | The HTTP server options. | | `http.addr` | String | `127.0.0.1:4000` | The address to bind the HTTP server. | | `http.timeout` | String | `30s` | HTTP request timeout. | | `http.body_limit` | String | `64MB` | HTTP request body limit.<br/>Support the following units are supported: `B`, `KB`, `KiB`, `MB`, `MiB`, `GB`, `GiB`, `TB`, `TiB`, `PB`, `PiB`. | | `grpc` | -- | -- | The gRPC server options. | | `grpc.addr` | String | `127.0.0.1:4001` | The address to bind the gRPC server. | | `grpc.runtime_size` | Integer | `8` | The number of server worker threads. | | `mysql` | -- | -- | MySQL server options. | | `mysql.enable` | Bool | `true` | Whether to enable. | | `mysql.addr` | String | `127.0.0.1:4002` | The addr to bind the MySQL server. | | `mysql.runtime_size` | Integer | `2` | The number of server worker threads. | | `mysql.tls` | -- | -- | -- | | `mysql.tls.mode` | String | `disable` | TLS mode, refer to https://www.postgresql.org/docs/current/libpq-ssl.html<br/>- `disable` (default value)<br/>- `prefer`<br/>- `require`<br/>- `verify-ca`<br/>- `verify-full` | | `mysql.tls.cert_path` | String | `None` | Certificate file path. | | `mysql.tls.key_path` | String | `None` | Private key file path. | | `mysql.tls.watch` | Bool | `false` | Watch for Certificate and key file change and auto reload | | `postgres` | -- | -- | PostgresSQL server options. | | `postgres.enable` | Bool | `true` | Whether to enable | | `postgres.addr` | String | `127.0.0.1:4003` | The addr to bind the PostgresSQL server. | | `postgres.runtime_size` | Integer | `2` | The number of server worker threads. | | `postgres.tls` | -- | -- | PostgresSQL server TLS options, see `mysql_options.tls` section. | | `postgres.tls.mode` | String | `disable` | TLS mode. | | `postgres.tls.cert_path` | String | `None` | Certificate file path. | | `postgres.tls.key_path` | String | `None` | Private key file path. | | `postgres.tls.watch` | Bool | `false` | Watch for Certificate and key file change and auto reload | | `opentsdb` | -- | -- | OpenTSDB protocol options. | | `opentsdb.enable` | Bool | `true` | Whether to enable OpenTSDB put in HTTP API. | | `influxdb` | -- | -- | InfluxDB protocol options. | | `influxdb.enable` | Bool | `true` | Whether to enable InfluxDB protocol in HTTP

| | `prom_store` | -- | -- | Prometheus remote storage options | | `prom_store.enable` | Bool | `true` | Whether to enable Prometheus remote write and read in HTTP API. | | `promstore.withmetric_engine` | Bool | `true` | Whether to store the data from Prometheus remote write in metric engine. | | `meta_client` | -- | -- | The metasrv client options. | | `metaclient.metasrvaddrs` | Array | -- | The addresses of the metasrv. | | `meta_client.timeout` | String | `3s` | Operation timeout. | | `metaclient.heartbeattimeout` | String | `500ms` | Heartbeat timeout. | | `metaclient.ddltimeout` | String | `10s` | DDL timeout. | | `metaclient.connecttimeout` | String | `1s` | Connect server timeout. | | `metaclient.tcpnodelay` | Bool | `true` | `TCP_NODELAY` option for accepted connections. | | `metaclient.metadatacachemaxcapacity` | Integer | `100000` | The configuration about the cache of the metadata. | | `metaclient.metadatacache_ttl` | String | `10m` | TTL of the metadata cache. | | `metaclient.metadatacache_tti` | String | `5m` | -- | | `datanode` | -- | -- | Datanode options. | | `datanode.client` | -- | -- | Datanode client options. | | `datanode.client.connect_timeout` | String | `10s` | -- | | `datanode.client.tcp_nodelay` | Bool | `true` | -- | | `logging` | -- | -- | The logging options. | | `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. | | `logging.level` | String | `None` | The log level. Can be `info`/`debug`/`warn`/`error`. | | `logging.enableotlptracing` | Bool | `false` | Enable OTLP tracing. | | `logging.otlp_endpoint` | String | `None` | The OTLP tracing endpoint. | | `logging.append_stdout` | Bool | `true` | Whether to append logs to stdout. | | `logging.tracingsampleratio` | -- | -- | The percentage of tracing will be sampled and exported.<br/>Valid range `[0, 1]`, 1 means all traces are sampled, 0 means all traces are not sampled, the default value is 1.<br/>ratio > 1 are treated as 1. Fractions < 0 are treated as 0 | | `logging.tracingsampleratio.default_ratio` | Float | `1.0` | -- | | `export_metrics` | -- | -- | The datanode can export its metrics and send to Prometheus compatible service (e.g. send to `greptimedb` itself) from remote-write API.<br/>This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape. | | `export_metrics.enable` | Bool | `false` | whether enable export metrics. | | `exportmetrics.writeinterval` | String | `30s` | The interval of export metrics. | | `exportmetrics.selfimport` | -- | -- | For `standalone` mode, `self_import` is recommend to collect metrics generated by itself | | `exportmetrics.selfimport.db` | String | `None` | -- | | `exportmetrics.remotewrite` | -- | -- | -- | | `exportmetrics.remotewrite.url` | String | `""` | The url the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=information_schema`. | | `exportmetrics.remotewrite.headers` | InlineTable | -- | HTTP headers of Prometheus remote-write carry. | | `tracing` | -- | -- | The tracing options. Only effect when compiled with `tokio-console` feature. | | `tracing.tokioconsoleaddr` | String | `None` | The tokio console address. | | Key | Type | Default | Descriptions | | | --| - | -- | | `data_home` | String | `/tmp/metasrv/` | The working home directory. | | `bind_addr` | String | `127.0.0.1:3002` | The bind address of metasrv. | | `server_addr` | String | `127.0.0.1:3002` | The communication server address for frontend and datanode to connect to metasrv, "127.0.0.1:3002" by default for localhost. | | `store_addr` | String | `127.0.0.1:2379` | Etcd server

| | `selector` | String | `leasebased` | Datanode selector type.<br/>- `leasebased` (default value).<br/>- `load_based`<br/>For details, please see "https://docs.greptime.com/developer-guide/metasrv/selector". | | `usememorystore` | Bool | `false` | Store data in memory. | | `enable_telemetry` | Bool | `true` | Whether to enable greptimedb telemetry. | | `storekeyprefix` | String | `""` | If it's not empty, the metasrv will store all data with this key prefix. | | `procedure` | -- | -- | Procedure storage options. | | `procedure.maxretrytimes` | Integer | `12` | Procedure max retry time. | | `procedure.retry_delay` | String | `500ms` | Initial retry delay of procedures, increases exponentially | | `procedure.maxmetadatavaluesize` | String | `1500KiB` | Auto split large value<br/>GreptimeDB procedure uses etcd as the default metadata storage backend.<br/>The etcd the maximum size of any request is 1.5 MiB<br/>1500KiB = 1536KiB (1.5MiB) - 36KiB (reserved size of key)<br/>Comments out the `maxmetadatavaluesize`, for don't split large value (no limit). | | `failure_detector` | -- | -- | -- | | `failure_detector.threshold` | Float | `8.0` | -- | | `failuredetector.minstd_deviation` | String | `100ms` | -- | | `failuredetector.acceptableheartbeat_pause` | String | `3000ms` | -- | | `failuredetector.firstheartbeat_estimate` | String | `1000ms` | -- | | `datanode` | -- | -- | Datanode options. | | `datanode.client` | -- | -- | Datanode client options. | | `datanode.client.timeout` | String | `10s` | -- | | `datanode.client.connect_timeout` | String | `10s` | -- | | `datanode.client.tcp_nodelay` | Bool | `true` | -- | | `wal` | -- | -- | -- | | `wal.provider` | String | `raft_engine` | -- | | `wal.broker_endpoints` | Array | -- | The broker endpoints of the Kafka cluster. | | `wal.num_topics` | Integer | `64` | Number of topics to be created upon start. | | `wal.selectortype` | String | `roundrobin` | Topic selector type.<br/>Available selector types:<br/>- `round_robin` (default) | | `wal.topicnameprefix` | String | `greptimedbwaltopic` | A Kafka topic is constructed by concatenating `topicnameprefix` and `topic_id`. | | `wal.replication_factor` | Integer | `1` | Expected number of replicas of each partition. | | `wal.createtopictimeout` | String | `30s` | Above which a topic creation operation will be cancelled. | | `wal.backoff_init` | String | `500ms` | The initial backoff for kafka clients. | | `wal.backoff_max` | String | `10s` | The maximum backoff for kafka clients. | | `wal.backoff_base` | Integer | `2` | Exponential backoff rate, i.e. next backoff = base * current backoff. | | `wal.backoff_deadline` | String | `5mins` | Stop reconnecting if the total wait time reaches the deadline. If this config is missing, the reconnecting won't terminate. | | `logging` | -- | -- | The logging options. | | `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. | | `logging.level` | String | `None` | The log level. Can be `info`/`debug`/`warn`/`error`. | | `logging.enableotlptracing` | Bool | `false` | Enable OTLP tracing. | | `logging.otlp_endpoint` | String | `None` | The OTLP tracing endpoint. | | `logging.append_stdout` | Bool | `true` | Whether to append logs to stdout. | | `logging.tracingsampleratio` | -- | -- | The percentage of tracing will be sampled and exported.<br/>Valid range `[0, 1]`, 1 means all traces are sampled, 0 means all traces are not sampled, the default value is 1.<br/>ratio > 1 are treated as 1. Fractions < 0 are treated as 0 | | `logging.tracingsampleratio.default_ratio` | Float |

| -- | | `export_metrics` | -- | -- | The datanode can export its metrics and send to Prometheus compatible service (e.g. send to `greptimedb` itself) from remote-write API.<br/>This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape. | | `export_metrics.enable` | Bool | `false` | whether enable export metrics. | | `exportmetrics.writeinterval` | String | `30s` | The interval of export metrics. | | `exportmetrics.selfimport` | -- | -- | For `standalone` mode, `self_import` is recommend to collect metrics generated by itself | | `exportmetrics.selfimport.db` | String | `None` | -- | | `exportmetrics.remotewrite` | -- | -- | -- | | `exportmetrics.remotewrite.url` | String | `""` | The url the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=information_schema`. | | `exportmetrics.remotewrite.headers` | InlineTable | -- | HTTP headers of Prometheus remote-write carry. | | `tracing` | -- | -- | The tracing options. Only effect when compiled with `tokio-console` feature. | | `tracing.tokioconsoleaddr` | String | `None` | The tokio console address. | | Key | Type | Default | Descriptions | | | --| - | -- | | `mode` | String | `standalone` | The running mode of the datanode. It can be `standalone` or `distributed`. | | `node_id` | Integer | `None` | The datanode identifier and should be unique in the cluster. | | `requireleasebefore_startup` | Bool | `false` | Start services after regions have obtained leases.<br/>It will block the datanode start if it can't receive leases in the heartbeat from metasrv. | | `initregionsin_background` | Bool | `false` | Initialize all regions in the background during the startup.<br/>By default, it provides services after all regions have been initialized. | | `rpc_addr` | String | `127.0.0.1:3001` | The gRPC address of the datanode. | | `rpc_hostname` | String | `None` | The hostname of the datanode. | | `rpcruntimesize` | Integer | `8` | The number of gRPC server worker threads. | | `rpcmaxrecvmessagesize` | String | `512MB` | The maximum receive message size for gRPC server. | | `rpcmaxsendmessagesize` | String | `512MB` | The maximum send message size for gRPC server. | | `enable_telemetry` | Bool | `true` | Enable telemetry to collect anonymous usage data. | | `heartbeat` | -- | -- | The heartbeat options. | | `heartbeat.interval` | String | `3s` | Interval for sending heartbeat messages to the metasrv. | | `heartbeat.retry_interval` | String | `3s` | Interval for retrying to send heartbeat messages to the metasrv. | | `meta_client` | -- | -- | The metasrv client options. | | `metaclient.metasrvaddrs` | Array | -- | The addresses of the metasrv. | | `meta_client.timeout` | String | `3s` | Operation timeout. | | `metaclient.heartbeattimeout` | String | `500ms` | Heartbeat timeout. | | `metaclient.ddltimeout` | String | `10s` | DDL timeout. | | `metaclient.connecttimeout` | String | `1s` | Connect server timeout. | | `metaclient.tcpnodelay` | Bool | `true` | `TCP_NODELAY` option for accepted connections. | | `metaclient.metadatacachemaxcapacity` | Integer | `100000` | The configuration about the cache of the metadata. | | `metaclient.metadatacache_ttl` | String | `10m` | TTL of the metadata cache. | | `metaclient.metadatacache_tti` | String | `5m` | -- | | `wal` | -- | -- | The WAL options. | | `wal.provider` | String | `raftengine` | The provider of the WAL.<br/>- `raftengine`: the wal is stored in the local file system by raft-engine.<br/>- `kafka`: it's remote wal that data is stored in Kafka. | | `wal.dir` | String | `None` | The directory to store the WAL files.<br/>It's only used when the provider is

| | `wal.filesize` | String | `256MB` | The size of the WAL segment file.<br/>**It's only used when the provider is `raftengine`. | | `wal.purgethreshold` | String | `4GB` | The threshold of the WAL size to trigger a flush.<br/>**It's only used when the provider is `raftengine`. | | `wal.purgeinterval` | String | `10m` | The interval to trigger a flush.<br/>**It's only used when the provider is `raftengine`. | | `wal.readbatchsize` | Integer | `128` | The read batch size.<br/>It's only used when the provider is `raft_engine`. | | `wal.syncwrite` | Bool | `false` | Whether to use sync write.<br/>**It's only used when the provider is `raftengine`. | | `wal.enablelogrecycle` | Bool | `true` | Whether to reuse logically truncated log files.<br/>It's only used when the provider is `raft_engine`. | | `wal.prefilllogfiles` | Bool | `false` | Whether to pre-create log files on start up.<br/>It's only used when the provider is `raft_engine`. | | `wal.syncperiod` | String | `10s` | Duration for fsyncing log files.<br/>**It's only used when the provider is `raftengine`. | | `wal.broker_endpoints` | Array | -- | The Kafka broker endpoints.<br/>It's only used when the provider is `kafka`. | | `wal.maxbatchsize` | String | `1MB` | The max size of a single producer batch.<br/>Warning: Kafka has a default limit of 1MB per message in a topic.<br/>It's only used when the provider is `kafka`. | | `wal.linger` | String | `200ms` | The linger duration of a kafka batch producer.<br/>It's only used when the provider is `kafka`. | | `wal.consumerwaittimeout` | String | `100ms` | The consumer wait timeout.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_init` | String | `500ms` | The initial backoff delay.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_max` | String | `10s` | The maximum backoff delay.<br/>It's only used when the provider is `kafka`. | | `wal.backoff_base` | Integer | `2` | The exponential backoff rate, i.e. next backoff = base current backoff.<br/>It's only used when the provider is `kafka`*. | | `wal.backoff_deadline` | String | `5mins` | The deadline of retries.<br/>It's only used when the provider is `kafka`. | | `storage` | -- | -- | The data storage options. | | `storage.data_home` | String | `/tmp/greptimedb/` | The working home directory. | | `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. | | `storage.cache_path` | String | `None` | Cache configuration for object storage such as 'S3' etc.<br/>The local file cache directory. | | `storage.cache_capacity` | String | `None` | The local file cache capacity in bytes. | | `storage.bucket` | String | `None` | The S3 bucket name.<br/>It's only used when the storage type is `S3`, `Oss` and `Gcs`. | | `storage.root` | String | `None` | The S3 data will be stored in the specified prefix, for example, `s3://${bucket}/${root}`.<br/>It's only used when the storage type is `S3`, `Oss` and `Azblob`. | | `storage.accesskeyid` | String | `None` | The access key id of the aws account.<br/>It's highly recommended to use AWS IAM roles instead of hardcoding the access key id and secret key.<br/>It's only used when the storage type is `S3` and `Oss`. | |

| String | `None` | The secret access key of the aws account.<br/>It's highly recommended to use AWS IAM roles instead of hardcoding the access key id and secret key.<br/>It's only used when the storage type is `S3`. | | `storage.accesskeysecret` | String | `None` | The secret access key of the aliyun account.<br/>It's only used when the storage type is `Oss`. | | `storage.account_name` | String | `None` | The account key of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.account_key` | String | `None` | The account key of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.scope` | String | `None` | The scope of the google cloud storage.<br/>It's only used when the storage type is `Gcs`. | | `storage.credential_path` | String | `None` | The credential path of the google cloud storage.<br/>It's only used when the storage type is `Gcs`. | | `storage.container` | String | `None` | The container of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.sas_token` | String | `None` | The sas token of the azure account.<br/>It's only used when the storage type is `Azblob`. | | `storage.endpoint` | String | `None` | The endpoint of the S3 service.<br/>It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`. | | `storage.region` | String | `None` | The region of the S3 service.<br/>It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`. | | `[[region_engine]]` | -- | -- | The region engine options. You can configure multiple region engines. | | `region_engine.mito` | -- | -- | The Mito engine options. | | `regionengine.mito.numworkers` | Integer | `8` | Number of region workers. | | `regionengine.mito.workerchannel_size` | Integer | `128` | Request channel size of each worker. | | `regionengine.mito.workerrequestbatchsize` | Integer | `64` | Max batch size for a worker to handle requests. | | `regionengine.mito.manifestcheckpoint_distance` | Integer | `10` | Number of meta action updated to trigger a new checkpoint for the manifest. | | `regionengine.mito.compressmanifest` | Bool | `false` | Whether to compress manifest and checkpoint file by gzip (default false). | | `regionengine.mito.maxbackground_jobs` | Integer | `4` | Max number of running background jobs | | `regionengine.mito.autoflush_interval` | String | `1h` | Interval to auto flush a region if it has not flushed yet. | | `regionengine.mito.globalwritebuffersize` | String | `1GB` | Global write buffer size for all regions. If not set, it's default to 1/8 of OS memory with a max limitation of 1GB. | | `regionengine.mito.globalwritebufferrejectsize` | String | `2GB` | Global write buffer size threshold to reject write requests. If not set, it's default to 2 times of `globalwritebuffersize` | | `regionengine.mito.sstmetacachesize` | String | `128MB` | Cache size for SST metadata. Setting it to 0 to disable the cache.<br/>If not set, it's default to 1/32 of OS memory with a max limitation of 128MB. | | `regionengine.mito.vectorcache_size` | String | `512MB` | Cache size for vectors and arrow arrays. Setting it to 0 to disable the cache.<br/>If not set, it's default to 1/16 of OS memory with a max limitation of 512MB. | | `regionengine.mito.pagecache_size` | String | `512MB` | Cache size for pages of SST row groups. Setting it to 0 to disable the cache.<br/>If not set, it's default to 1/16 of OS memory with a max limitation of 512MB. | | `regionengine.mito.sstwritebuffersize` | String | `8MB` | Buffer size for SST writing. | |

| Integer | `0` | Parallelism to scan a region (default: 1/4 of cpu cores).<br/>- `0`: using the default value (1/4 of cpu cores).<br/>- `1`: scan in current thread.<br/>- `n`: scan in parallelism n. | | `regionengine.mito.parallelscanchannelsize` | Integer | `32` | Capacity of the channel to send data from parallel scan tasks to the main task. | | `regionengine.mito.allowstale_entries` | Bool | `false` | Whether to allow stale WAL entries read during replay. | | `regionengine.mito.invertedindex` | -- | -- | The options for inverted index in Mito engine. | | `regionengine.mito.invertedindex.createonflush` | String | `auto` | Whether to create the index on flush.<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.createoncompaction` | String | `auto` | Whether to create the index on compaction.<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.applyonquery` | String | `auto` | Whether to apply the index on query<br/>- `auto`: automatically<br/>- `disable`: never | | `regionengine.mito.invertedindex.memthresholdon_create` | String | `64M` | Memory threshold for performing an external sort during index creation.<br/>Setting to empty will disable external sorting, forcing all sorting operations to happen in memory. | | `regionengine.mito.invertedindex.intermediatepath` | String | `""` | File system path to store intermediate files for external sorting (default `{datahome}/index_intermediate`). | | `region_engine.mito.memtable` | -- | -- | -- | | `regionengine.mito.memtable.type` | String | `timeseries` | Memtable type.<br/>- `timeseries`: time-series memtable<br/>- `partitiontree`: partition tree memtable (experimental) | | `regionengine.mito.memtable.indexmaxkeyspershard` | Integer | `8192` | The max number of keys in one shard.<br/>Only available for `partitiontree` memtable. | | `regionengine.mito.memtable.datafreezethreshold` | Integer | `32768` | The max rows of data inside the actively writing buffer in one shard.<br/>Only available for `partitiontree` memtable. | | `regionengine.mito.memtable.forkdictionarybytes` | String | `1GiB` | Max dictionary bytes.<br/>Only available for `partitiontree` memtable. | | `logging` | -- | -- | The logging options. | | `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. | | `logging.level` | String | `None` | The log level. Can be `info`/`debug`/`warn`/`error`. | | `logging.enableotlptracing` | Bool | `false` | Enable OTLP tracing. | | `logging.otlp_endpoint` | String | `None` | The OTLP tracing endpoint. | | `logging.append_stdout` | Bool | `true` | Whether to append logs to stdout. | | `logging.tracingsampleratio` | -- | -- | The percentage of tracing will be sampled and exported.<br/>Valid range `[0, 1]`, 1 means all traces are sampled, 0 means all traces are not sampled, the default value is 1.<br/>ratio > 1 are treated as 1. Fractions < 0 are treated as 0 | | `logging.tracingsampleratio.default_ratio` | Float | `1.0` | -- | | `export_metrics` | -- | -- | The datanode can export its metrics and send to Prometheus compatible service (e.g. send to `greptimedb` itself) from remote-write API.<br/>This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape. | | `export_metrics.enable` | Bool | `false` | whether enable export metrics. | | `exportmetrics.writeinterval` | String | `30s` | The interval of export metrics. | | `exportmetrics.selfimport` | -- | -- | For `standalone` mode, `self_import` is recommend to collect metrics generated by itself | | `exportmetrics.selfimport.db` | String | `None` | -- | | `exportmetrics.remotewrite` | -- | -- | -- | | `exportmetrics.remotewrite.url` | String | `""` | The url the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=information_schema`. | | `exportmetrics.remotewrite.headers` | InlineTable | -- | HTTP headers of Prometheus remote-write carry. | | `tracing` | -- | -- | The tracing options. Only effect when compiled with `tokio-console` feature. | | `tracing.tokioconsoleaddr` | String | `None` | The tokio console address. |