2. Configuration#

2.1. QuasarDB Daemon#

Every server setting can be supplied in a JSON configuration file, as a command-line argument, or as an environment variable. Packaged installations typically use /etc/qdb/qdbd.conf; the exact location depends on the installation method.

The dotted config-file names in the tables below identify paths in the nested JSON document. For example, local.limiter.memory_statistics_refresh maps to locallimitermemory_statistics_refresh. Use qdbd --gen-complete-config to generate a complete configuration, including the defaults for the installed server version. qdbd --gen-config omits settings that have their default value. The generated complete configuration is the authoritative inventory; the tables below document commonly configured settings and their equivalent config-file, command-line, and environment-variable forms.

When the same setting is supplied through more than one form, command-line arguments take precedence over the configuration file, and the configuration file takes precedence over environment variables. Invalid configuration files and invalid combinations are rejected instead of being silently ignored.

2.1.1. License#

You can set a license either by file or by putting the license key as a string directly into your configuration.

Config File

Command-Line Argument

Environment Variable

Description

local.user.license_file

--local-user-license-file

QDB_LOCAL_USER_LICENSE_FILE

Path to the license file. Ensure that it is readable by the account that runs qdbd. When neither a license file nor a license key is supplied, the daemon runs in free mode.

local.user.license_key

--local-user-license-key

QDB_LOCAL_USER_LICENSE_KEY

License key as a string. Supplying a key directly can expose it through process or configuration inspection; prefer a license file where appropriate.

2.1.2. Parallelism#

Warning

Improper parallelism settings can reduce performance.

QuasarDB has been designed for multicore architectures. Queries coming from clients are processed in parallel across multiple partitions. Each partition is a thread pool that processes one or more shards (time-based data units) in parallel.

In most instances, you want to use the unified setting that gives a “budget” to let QuasarDB pick for you the right number of partitions and threads per partitions.

Config File

Command-Line Argument

Environment Variable

Description

local.network.parallelism

--local-network-parallelism

QDB_LOCAL_NETWORK_PARALLELISM

How many cores to allocate to process queries. The default of 0 will let QuasarDB pick a number depending on the computing resources available on the computer.

local.network.threads_per_partition

--local-network-threads-per-partition

QDB_LOCAL_NETWORK_THREADS_PER_PARTITION

Number of query-processing threads in each partition. 0 selects an automatic value. Configure this together with partitions_count only when manual control is required; it cannot be combined with a nonzero parallelism value.

It’s possible to have total control over the configuration in using the partitions_count and threads_per_partition settings. Partitions are thread pools that process queries in parallel, with each partition able to perform one storage write at a time. If these values are not 0, the parallelism setting will be ignored and QuasarDB will use the exact configured number of partitions and threads per partition. It is strongly advised to set partitions_count and threads_per_partition to 0 and use the parallelism setting instead, which automatically determines optimal values based on available CPU cores.

Note

The storage layer has its own thread settings, so its threads are additional to the query-processing allocation.

2.1.3. Storage#

Config File,Command-Line Argument & Environment Variable

Description

global.cluster.storage_engine
--global-cluster-storage-engine
QDB_GLOBAL_CLUSTER_STORAGE_ENGINE

Specifies which storage engine to use. Accepted values: rocksdb or transient. Defaults to rocksdb. See Transient Storage Engine for transient storage details.

local.depot.rocksdb.root
--local-depot-rocksdb-root
QDB_LOCAL_DEPOT_ROCKSDB_ROOT

Root directory for RocksDB data. The daemon’s built-in default is db, relative to its working directory. Packaged installations normally set this to /var/lib/qdb in qdbd.conf.

local.depot.rocksdb.wal
--local-depot-rocksdb-wal
QDB_LOCAL_DEPOT_ROCKSDB_WAL

Location to the Write-Ahead-Log (WAL) folder. Defaults to empty, which will make it a subdirectory of the root directory called “wal”.

local.depot.rocksdb.tiered_storage
--local-depot-rocksdb-tiered-storage
QDB_LOCAL_DEPOT_ROCKSDB_TIERED_STORAGE

An array in the form [{“path”: “path1”, “size”: size1}, {“path”: “path2”, “size”: size2}] which specified, which directory, in order should be used for storage. When a storage exceeds capacity, older data is moved to the next storage in the list. Actual usage may exceed the size specified. Size is specified in bytes.

local.depot.rocksdb.compaction
--local-depot-rocksdb-compaction
QDB_LOCAL_DEPOT_ROCKSDB_COMPACTION

The compaction strategy to use. By default it is “leveled”, but “universal” is also accepted. Universal improves write amplification at the cost of space amplification.

local.depot.rocksdb.disable_wal
--local-depot-rocksdb-disable-wal
QDB_LOCAL_DEPOT_ROCKSDB_DISABLE_WAL

When this option is set to true, writes will not go to the Write-Ahead-Log (WAL), increasing performance at the cost of durability. Writes go to the WAL by default. Use this option with caution.

local.depot.rocksdb.max_total_wal_size
--local-depot-rocksdb-max-total-wal-size
QDB_LOCAL_DEPOT_ROCKSDB_MAX_TOTAL_WAL_SIZE

Size, in bytes, of the Write-Ahead-Log (WAL). The WAL is where every update gets written and protects memtables against crashes. When the WAL is full, memtables are flushed to disk. If the WAL is too small, memtables may thus be flushed before they are full, impacting write speed. However, large WALs means increased memory usage and potentially higher compaction. Your WAL should be large enough to absorbs spikes, but cannot be used to compensate for a persistence layer too slow to absorb the load or memtables being too small. See local.depot.rocksdb.table_mem_budget.

local.depot.rocksdb.max_background_flushes
--local-depot-rocksdb-max-background-flushes
QDB_LOCAL_DEPOT_ROCKSDB_MAX_BACKGROUND_FLUSHES

How many threads will be dedicated to writing data to disk. Write-heavy scenarios may benefit from a higher count. Defaults to 1.

local.depot.rocksdb.max_bytes
--local-depot-rocksdb-max-bytes
QDB_LOCAL_DEPOT_ROCKSDB_MAX_BYTES

Maximum RocksDB size in bytes. 0 means no configured limit. Once the limit is reached, storage operations fail with a no-space error.

local.depot.rocksdb.persistent_cache_path
--local-depot-rocksdb-persistent-cache-path
QDB_LOCAL_DEPOT_ROCKSDB_PERSISTENT_CACHE_PATH

A path to a local disk to be used as a persistent cache. May increase performance when data is stored in a remote disk.

local.depot.rocksdb.persistent_cache_size
--local-depot-rocksdb-persistent-cache-size
QDB_LOCAL_DEPOT_ROCKSDB_PERSISTENT_CACHE_SIZE

The maximum size of the persistent cache, in bytes. Cannot be zero if the persistent cache path is specified.

local.depot.rocksdb.persistent_cache_nvme_optimization
--local-depot-rocksdb-persistent-cache-nvme-optimization
QDB_LOCAL_DEPOT_ROCKSDB_PERSISTENT_CACHE_NVME_OPTIMIZATION

If your persistent cache is on an NVME, enabling this option may increase performance.

local.depot.rocksdb.additional_options
--local-depot-rocksdb-additional-options
QDB_LOCAL_DEPOT_ROCKSDB_ADDITIONAL_OPTIONS

Specifies additional configuration options to fine-tune RocksDB storage behavior.

local.depot.rocksdb.columns_options
--local-depot-rocksdb-columns-options
QDB_LOCAL_DEPOT_ROCKSDB_COLUMNS_OPTIONS

A map of column-family names to advanced RocksDB column options, including block-based table options.

local.depot.rocksdb.storage_warning_level
--local-depot-rocksdb-storage-warning-level
QDB_LOCAL_DEPOT_ROCKSDB_STORAGE_WARNING_LEVEL

The percentage of configured storage capacity at which QuasarDB starts warning about low disk space. Valid values are from 50 to 100; the default is 90.

local.depot.rocksdb.sync_period_with_master_db
--local-depot-rocksdb-sync-period-with-master-db
QDB_LOCAL_DEPOT_ROCKSDB_SYNC_PERIOD_WITH_MASTER_DB

The interval for synchronizing the read-only RocksDB-cloud with the master database. It cannot exceed 30 minutes - half the time it takes for deleted files.

local.depot.rocksdb.create_if_missing
--local-depot-rocksdb-create-if-missing
QDB_LOCAL_DEPOT_ROCKSDB_CREATE_IF_MISSING

A boolean value indicating whether the storage engine should create a new database if it doesn’t already exist. When set to true, the storage engine will create a new database if one with the specified name is not found.

local.depot.rocksdb.disable_auto_compaction
--local-depot-rocksdb-disable-auto-compaction
QDB_LOCAL_DEPOT_ROCKSDB_DISABLE_AUTO_COMPACTION

A boolean value that, when set to true, disables automatic compaction of SST files in the storage engine. Compaction is a process that merges and optimizes data files to improve storage efficiency. Disabling auto-compaction means users must manually run cluster_compact in qdbsh often. This boosts write performance but can harm read performance.

local.depot.rocksdb.disable_manifest_sync
--local-depot-rocksdb-disable-manifest-sync
QDB_LOCAL_DEPOT_ROCKSDB_DISABLE_MANIFEST_SYNC

A boolean value that, when set to true, prevents the storage engine from synchronizing manifest files with disk. Manifest files are used to track the state of the SST files in the storage engine.

local.depot.rocksdb.keep_log_file_num
--local-depot-rocksdb-keep-log-file-num
QDB_LOCAL_DEPOT_ROCKSDB_KEEP_LOG_FILE_NUM

Maximum number of RocksDB informational log files to retain. The default is 20. These are diagnostic logs, not the write-ahead log used for crash recovery.

local.depot.rocksdb.log_file_time_to_roll
--local-depot-rocksdb-log-file-time-to-roll
QDB_LOCAL_DEPOT_ROCKSDB_LOG_FILE_TIME_TO_ROLL

An integer representing the time interval, in milliseconds, after which log files in the storage engine will be rolled. Rolling involves closing the current log file and starting a new one to manage the size of log files.

local.depot.rocksdb.max_log_file_size
--local-depot-rocksdb-max-log-file-size
QDB_LOCAL_DEPOT_ROCKSDB_MAX_LOG_FILE_SIZE

An integer specifying the maximum size of log files in the storage engine, in bytes. When a log file reaches this size, it will be rolled to a new file.

local.depot.rocksdb.paranoid_checks
--local-depot-rocksdb-paranoid-checks
QDB_LOCAL_DEPOT_ROCKSDB_PARANOID_CHECKS

A boolean value indicating whether to perform extra checks for data integrity and correctness. When enabled, the storage engine will perform additional validation to catch potential errors.

local.depot.rocksdb.paranoid_file_checks
--local-depot-rocksdb-paranoid-file-checks
QDB_LOCAL_DEPOT_ROCKSDB_PARANOID_FILE_CHECKS

A boolean value indicating whether to perform extra checks on data files for integrity and correctness. Similar to paranoid_checks, this option applies specifically to data files in the storage engine.

local.depot.rocksdb.rate_limit
--local-depot-rocksdb-rate-limit
QDB_LOCAL_DEPOT_ROCKSDB_RATE_LIMIT

The rate limit is specified in bytes per second; a value of 0 indicates that rate limiting is disabled. This rate limit applies to the amount of I/O allocated for flushing and compaction, with flushing operations prioritized over compaction

local.depot.rocksdb.read_only
--local-depot-rocksdb-read-only
QDB_LOCAL_DEPOT_ROCKSDB_READ_ONLY

A boolean value indicating whether the database should be opened in read-only mode. When set to true, write operations will be disallowed.

local.depot.rocksdb.storage_warning_interval
--local-depot-rocksdb-storage-warning-interval
QDB_LOCAL_DEPOT_ROCKSDB_STORAGE_WARNING_INTERVAL

Specifies the interval for emitting warnings about depleting disk space. This warning helps users take timely action to prevent running out of disk space.

local.depot.rocksdb.threads
--local-depot-rocksdb-threads
QDB_LOCAL_DEPOT_ROCKSDB_THREADS

Should be increased if the daemon is under constant insertion pressure, and there is still available CPU: it increases the amount of threads the storage engine has available for background operations such as compaction.

local.depot.rocksdb.hi_threads
--local-depot-rocksdb-hi-threads
QDB_LOCAL_DEPOT_ROCKSDB_HI_THREADS

The number of threads allocated to high-priority operations such as flushes to disk. The default setting of 2 is sufficient for most cases. Increase if the server cannot keep up with the persistence layer.

local.depot.rocksdb.cloud.aws.access_key_id
--local-depot-rocksdb-cloud-aws-access-key-id
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_ACCESS_KEY_ID

The AWS access key id to use for authentication.

local.depot.rocksdb.cloud.aws.secret_key
--local-depot-rocksdb-cloud-aws-secret-key
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_SECRET_KEY

The secret key to use for authentication. You need both the access key and secret key set for authentication to work. access_key_id and secret_key is not recommended for production deployments. Use use_instance_auth for production.

local.depot.rocksdb.cloud.constant_sst_file_size_in_sst_file_manager
--local-depot-rocksdb-cloud-constant-sst-file-size-in-sst-file-manager
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_CONSTANT_SST_FILE_SIZE_IN_SST_FILE_MANAGER

Specifies a constant size for SST files within the SST file manager in cloud storage. The value is set to -1, indicating that the default size is used.

local.depot.rocksdb.cloud.number_objects_listed_in_one_iteration
--local-depot-rocksdb-cloud-number-objects-listed-in-one-iteration
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_NUMBER_OBJECTS_LISTED_IN_ONE_ITERATION

Determines the number of objects listed in a single iteration when interacting with cloud storage. The value is set to 5000.

local.depot.rocksdb.cloud.ssl_ca_certificate
--local-depot-rocksdb-cloud-ssl-ca-certificate
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_SSL_CA_CERTIFICATE

Specifies the path to the SSL certificate authority (CA) certificate for secure communication with cloud storage. The value is an empty string.

local.depot.rocksdb.cloud.ssl_verify
--local-depot-rocksdb-cloud-ssl-verify
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_SSL_VERIFY

Controls SSL verification when communicating with cloud storage. The value is set to true.

local.depot.rocksdb.cloud.local_sst_cache_size
--local-depot-rocksdb-cloud-local-sst-cache-size
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_LOCAL_SST_CACHE_SIZE

The size of the local SST cache, in bytes. The default value is 0, which disables the local SST cache.

local.depot.rocksdb.cloud.request_timeout
--local-depot-rocksdb-cloud-request-timeout
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_REQUEST_TIMEOUT

The timeout used for cloud queries, in milliseconds. The default of 0 means that the cloud provider’s default will be used.

local.depot.rocksdb.cloud.create_bucket_if_missing
--local-depot-rocksdb-cloud-create-bucket-if-missing
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_CREATE_BUCKET_IF_MISSING

Will create the bucket if it does not exist.

local.depot.rocksdb.cloud.bucket.destination_bucket
--local-depot-rocksdb-cloud-bucket-destination-bucket
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_BUCKET_DESTINATION_BUCKET

The bucket name where to store the data. On AWS, the bucket name must be unique. If name is empty, the database will not upload its content to the cloud.

local.depot.rocksdb.cloud.bucket.source_bucket
--local-depot-rocksdb-cloud-bucket-source-bucket
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_BUCKET_SOURCE_BUCKET

The bucket name where to read the data from. On AWS, the bucket name must be unique. If name is empty, the database will not read its content from the cloud.

local.depot.rocksdb.cloud.aws.config_file
--local-depot-rocksdb-cloud-aws-config-file
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_CONFIG_FILE

The configuration file to use for authentication. When using a configuration file, access_key_id and secret_key must be left blank.

local.depot.rocksdb.cloud.aws.use_transfer_manager
--local-depot-rocksdb-cloud-aws-use-transfer-manager
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_USE_TRANSFER_MANAGER

Enabling this option leverages the parallelism of uploads and downloads of files to and from S3. This optimization enhances performance but necessitates increased memory usage for various buffers.

local.depot.rocksdb.cloud.aws.transfer_manager_threads
--local-depot-rocksdb-cloud-aws-transfer-manager-threads
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_TRANSFER_MANAGER_THREADS

The number of threads to be used by the AWS transfer manager.

local.depot.rocksdb.cloud.aws.transfer_manager_buffer_size
--local-depot-rocksdb-cloud-aws-transfer-manager-buffer-size
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_TRANSFER_MANAGER_BUFFER_SIZE

The buffer size for the AWS transfer manager. Files larger will be broken into smaller pieces, transfered in parallel.

local.depot.rocksdb.cloud.aws.endpoint_override
--local-depot-rocksdb-cloud-aws-endpoint-override
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_ENDPOINT_OVERRIDE

This configuration is intended for non-AWS S3 deployments. It allows you to specify a different hostname or IP address to communicate with, replacing the default AWS S3 endpoint.

local.depot.rocksdb.cloud.aws.config_file_section
--local-depot-rocksdb-cloud-aws-config-file-section
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_CONFIG_FILE_SECTION

The section name in the configuration file with the access key_id, secret_key and session_token

local.depot.rocksdb.cloud.aws.encryption_key_id
--local-depot-rocksdb-cloud-aws-encryption-key-id
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_ENCRYPTION_KEY_ID

AWS KMS key ID to use for S3 server-side encryption. Leave this string empty to use S3-managed server-side encryption when encryption is otherwise enabled by the storage integration.

local.depot.rocksdb.cloud.aws.use_instance_auth
--local-depot-rocksdb-cloud-aws-use-instance-auth
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_AWS_USE_INSTANCE_AUTH

When enabled, this configuration utilizes EC2 instance metadata for automatic authentication credential resolution when communicating with the S3 bucket. It is typically recommended to set this to true in production deployments for seamless and secure credential management.

local.depot.rocksdb.cloud.bucket.path_prefix
--local-depot-rocksdb-cloud-bucket-path-prefix
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_BUCKET_PATH_PREFIX

Quasardb will use local.depot.rocksdb.root as the path inside the bucket to store the data in the cloud. If path_prefix is not empty, a prefix will be added to this path. That way, different nodes can use the same local path and write to different paths within a same bucket.

local.depot.rocksdb.cloud.bucket.region
--local-depot-rocksdb-cloud-bucket-region
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_BUCKET_REGION

The region where the bucket is located.

local.depot.rocksdb.cloud.provider
--local-depot-rocksdb-cloud-provider
QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_PROVIDER

A string either “none” or “aws” specifying your cloud provider to use to store the cloud data.

For more information regarding RocksDB tuning refer to RocksDB Tuning Guide

2.1.3.1. Transient Storage Engine#

The transient storage engine is an in-memory storage option designed exclusively for automated testing environments. It provides no data persistence and keeps all data in memory.

Key characteristics:

  • No disk writes - all data stored in memory only

  • Faster write operations compared to RocksDB

  • Slower read operations due to less efficient indexing

  • All data lost on node restart or eviction

  • Not suitable for production use

Critical limitations:

  • All nodes in a cluster must use the same storage engine. Mixing transient and RocksDB nodes causes undefined behavior and data loss.

  • No statistics collection

  • No entry iteration support

  • Data evicted from memory is permanently lost

When to use:

Use transient storage only for automated test suites where data persistence is not required and you need a clean, ephemeral database instance.

For conceptual details, see Transient mode in Data Storage.

2.1.4. Networking#

The QuasarDB daemon uses TCP for network communications and listens to two ports. The primary port is configurable and is the port used by client applications. Its default value is 2836. The secondary port, is used for cluster discovery mechanisms and queries run on separate, higher priority partitions. This design ensures that when the server is busy processing queries, it can still service cluster management requests and preserve stability.

The value of the secondary port is set to the value of the primary port plus one (1). Thus, by default, the value of the secondary port is 2837.

Config File

Command-Line Argument

Environment Variable

Description

local.network.listen_on

--local-network-listen-on

QDB_LOCAL_NETWORK_LISTEN_ON

Local address and port to bind to for accepting new connections. Can also refer to network adapter, e.g. eth0:2836. Defaults to 127.0.0.1:2836. The daemon will listen to the specified port and the port + 1 for service messages. For example, if the server is configured to listen to 127.0.0.1:2836 it will also listen to 127.0.0.1:2837.

local.network.advertise_as

--local-network-advertise-as

QDB_LOCAL_NETWORK_ADVERTISE_AS

Specify if the local address we bind to is not the same as other nodes or clients should use to connect to the daemon (e.g. when behind a NAT). Defaults to 127.0.0.1:2836.

local.network.idle_timeout

--local-network-idle-timeout

QDB_LOCAL_NETWORK_IDLE_TIMEOUT

Time, in milliseconds, until an idle server socket can be recycled. The default is 900000 (15 minutes).

local.network.client_timeout

--local-network-client-timeout

QDB_LOCAL_NETWORK_CLIENT_TIMEOUT

Timeout for remote requests, in milliseconds. The default is 300000 (5 minutes).

local.network.max_in_buffer_size

--local-network-max-in-buffer-size

QDB_LOCAL_NETWORK_MAX_IN_BUFFER_SIZE

Maximum accepted input message size, in bytes. The minimum is 1500; the default is 134217728 (128 MiB).

local.network.max_out_buffer_size

--local-network-max-out-buffer-size

QDB_LOCAL_NETWORK_MAX_OUT_BUFFER_SIZE

Configured maximum output message size, in bytes. The minimum is 1 KiB and the default is 128 MiB. This setting is currently retained for compatibility but is not enforced by the server.

global.cluster.publish_firehose

--global-cluster-publish-firehose

QDB_GLOBAL_CLUSTER_PUBLISH_FIREHOSE

Enables publishing changes on the firehose endpoint. The default is false. This setting is independent of persisted firehose storage.

local.network.firehose_endpoint

--local-network-firehose-endpoint

QDB_LOCAL_NETWORK_FIREHOSE_ENDPOINT

Endpoint on which the firehose publisher accepts subscribers. It is only active when firehose publishing is enabled and defaults to 127.0.0.1:3836.

global.cluster.persisted_firehose

--global-cluster-persisted-firehose

QDB_GLOBAL_CLUSTER_PERSISTED_FIREHOSE

A string representing the name of the persisted firehose. The default is an empty string, which disables the persisted firehose.

global.cluster.persisted_firehose_shard_size

--global-cluster-persisted-firehose-shard-size

QDB_GLOBAL_CLUSTER_PERSISTED_FIREHOSE_SHARD_SIZE

Persisted-firehose shard duration in milliseconds. The minimum is 1; the default is 3600000 (1 hour).

global.cluster.enable_replication

--global-cluster-enable-replication

QDB_GLOBAL_CLUSTER_ENABLE_REPLICATION

Enable replication. Enabled by default.

global.cluster.enable_micro_index_acceleration

--global-cluster-enable-micro-index-acceleration

QDB_GLOBAL_CLUSTER_ENABLE_MICRO_INDEX_ACCELERATION

Allows queries to use microindexes for selections and aggregations. Enabled by default and normally changed only for troubleshooting or testing.

local.network.firehose_publishing_threads

--local-network-firehose-publishing-threads

QDB_LOCAL_NETWORK_FIREHOSE_PUBLISHING_THREADS

Specifies the number of threads used for publishing data to Firehose. The default value is 1.

local.network.new_version_check

--local-network-new-version-check

QDB_LOCAL_NETWORK_NEW_VERSION_CHECK

Controls whether the daemon checks for new versions. Enabled by default.

local.network.total_server_sessions

--local-network-total-server-sessions

QDB_LOCAL_NETWORK_TOTAL_SERVER_SESSIONS

Preferred setting for the maximum number of concurrent server connections. 0 selects an automatic value based on the resolved partition and thread counts. Values must be below 1,000,000.

local.network.log_slow_operation_ms

--local-network-log-slow-operation-ms

QDB_LOCAL_NETWORK_LOG_SLOW_OPERATION_MS

Threshold in milliseconds for logging slow network operations. 0 disables this logging and is the default.

local.network.connection_per_address_soft_limit

--local-network-connection-per-address-soft-limit

QDB_LOCAL_NETWORK_CONNECTION_PER_ADDRESS_SOFT_LIMIT

Soft limit for outbound connections to one address. The default is 256.

2.1.5. Clustering#

Config File

Command-Line Argument

Environment Variable

Description

local.chord.node_id

--local-chord-node-id

QDB_LOCAL_CHORD_NODE_ID

Unique identifier for this node. See also: Node ID configuration.

local.chord.bootstrapping_peers

--local-chord-bootstrapping-peers

QDB_LOCAL_CHORD_BOOTSTRAPPING_PEERS

One or more peers that should be connected to to discover and bootstrap the cluster. Peers should be specified as a JSON array of tuples of address:port, e.g. ["192.168.1.1:2836", "192.168.1.2:2836"].

global.cluster.replication_factor

--global-cluster-replication-factor

QDB_GLOBAL_CLUSTER_REPLICATION_FACTOR

Replication factor of data stored inside the cluster. It cannot be higher than 5. A replication factor of 1 means no replication.

global.cluster.acl_cache_duration

--global-cluster-acl-cache-duration

QDB_GLOBAL_CLUSTER_ACL_CACHE_DURATION

Maximum ACL cache duration in milliseconds. The default is 60000.

global.cluster.acl_cache_size

--global-cluster-acl-cache-size

QDB_GLOBAL_CLUSTER_ACL_CACHE_SIZE

Maximum number of ACL cache entries per node. The minimum is 10 and the default is 100000.

global.cluster.enable_remote_acl_fetch

--global-cluster-enable-remote-acl-fetch

QDB_GLOBAL_CLUSTER_ENABLE_REMOTE_ACL_FETCH

Allows ACL information to be fetched from other nodes. Enabled by default.

global.cluster.max_transaction_duration

--global-cluster-max-transaction-duration

QDB_GLOBAL_CLUSTER_MAX_TRANSACTION_DURATION

An integer representing the maximum guaranteed duration of a transaction, in milliseconds. Transactions exceeding this interval are rolled back. The default value is 15,000 ms.

global.cluster.max_versions

--global-cluster-max-versions

QDB_GLOBAL_CLUSTER_MAX_VERSIONS

Maximum number of entry versions retained for transaction history. The minimum is 2 and the default is 3.

local.chord.max_stabilization_interval

--local-chord-max-stabilization-interval

QDB_LOCAL_CHORD_MAX_STABILIZATION_INTERVAL

Maximum wait between stabilizations, in milliseconds. It must be greater than 10 and greater than min_stabilization_interval. The default is 60000.

local.chord.min_stabilization_interval

--local-chord-min-stabilization-interval

QDB_LOCAL_CHORD_MIN_STABILIZATION_INTERVAL

Minimum wait between stabilizations, in milliseconds. It must be greater than 1 and lower than max_stabilization_interval. The default is 100.

local.chord.no_stabilization

--local-chord-no-stabilization

QDB_LOCAL_CHORD_NO_STABILIZATION

Disables the Chord stabilization, finger-fixing, and peer services. This is intended for specialized testing and should remain false in a normal cluster.

local.chord.sync_before_join

--local-chord-sync-before-join

QDB_LOCAL_CHORD_SYNC_BEFORE_JOIN

Enable or disable synchronization of data before joining the cluster. Enabling it might provoke spurious data downloads and higher disk usage. Disabling it on a clear node might result in missing historical data on this node.

2.1.6. Security#

Config File

Command-Line Argument

Environment Variable

Description

global.security.enabled

--global-security-enabled

QDB_GLOBAL_SECURITY_ENABLED

Boolean that determines whether security should be enabled. Valid values are true and false. Defaults to false. Enabling this to true requires you to set valid values for user_list and cluster_private_file.

global.security.user_list

--global-security-user-list

QDB_GLOBAL_SECURITY_USER_LIST

Absolute location to the file that contains the QuasarDB users. Typically should be /etc/qdb/users.txt. The file can be created and managed using the QuasarDB user management tool, and needs to be identically replicated accross all QuasarDB daemon nodes.

global.security.cluster_private_file

--global-security-cluster-private-file

QDB_GLOBAL_SECURITY_CLUSTER_PRIVATE_FILE

Absolute location to the cluster private key file. Typically should be /etc/qdb/cluster_private.key. The file can be created and managed using the QuasarDB cluster keygen, and needs to be identically replicated accross all QuasarDB daemon nodes.

global.security.user_list_backup_path

--global-security-user-list-backup-path

QDB_GLOBAL_SECURITY_USER_LIST_BACKUP_PATH

Directory used to back up user credential files. The default is empty.

global.security.block_user_properties

--global-security-block-user-properties

QDB_GLOBAL_SECURITY_BLOCK_USER_PROPERTIES

Up to four client user-property key/value pairs that are prohibited from connecting to the cluster.

global.security.encrypt_traffic

--global-security-encrypt-traffic

QDB_GLOBAL_SECURITY_ENCRYPT_TRAFFIC

Boolean that determines whether full stream encryption should be enabled, including both client-to-server and node-to-node cluster communication. Valid values are true and false. Defaults to false. Note: clients must also be configured to use encrypted connections via API-specific parameters.

global.security.enable_purge_all

--global-security-enable-purge-all

QDB_GLOBAL_SECURITY_ENABLE_PURGE_ALL

Allows the cluster to be remotely purged via an API call. False by default.

global.security.enable_stop

--global-security-enable-stop

QDB_GLOBAL_SECURITY_ENABLE_STOP

Allows a node to be stopped remotely through an API call. Disabled by default.

2.1.7. Performance tuning#

Config File

Command-Line Argument

Environment Variable

Description

local.network.server_sessions

--local-network-server-sessions

QDB_LOCAL_NETWORK_SERVER_SESSIONS

Deprecated per-partition session limit retained for compatibility. Use local.network.total_server_sessions instead. Do not set both options.

local.network.partitions_count

--local-network-partitions-count

QDB_LOCAL_NETWORK_PARTITIONS_COUNT

The number of partitions (thread pools) for query processing. Each partition can perform one storage write at a time while handling multiple reads in parallel. Client connections are pinned to partitions. Use local.network.parallelism instead to let QuasarDB automatically determine optimal values.

local.network.hi_partitions_count

--local-network-hi-partitions-count

QDB_LOCAL_NETWORK_HI_PARTITIONS_COUNT

Number of high-priority partitions used for service traffic on the secondary port. Valid values are 1 through 999; the default is 2.

local.depot.rocksdb.max_open_files

--local-depot-rocksdb-max-open-files

QDB_LOCAL_DEPOT_ROCKSDB_MAX_OPEN_FILES

Maximum number of RocksDB files kept open. 0 selects automatic detection and is the default. An explicit value must fit within the operating system’s file-descriptor limit.

local.limiter.max_bytes_soft

--local-limiter-max-bytes-soft

QDB_LOCAL_LIMITER_MAX_BYTES_SOFT

Resident-memory threshold, in bytes, at which QuasarDB starts evicting cached entries. 0 selects an automatic value. Do not combine a nonzero byte value with max_bytes_soft_percentage.

local.limiter.max_bytes_hard

--local-limiter-max-bytes-hard

QDB_LOCAL_LIMITER_MAX_BYTES_HARD

Emergency resident-memory threshold, in bytes. At this limit QuasarDB pauses processing and performs aggressive eviction. 0 selects an automatic value. Do not combine a nonzero byte value with max_bytes_hard_percentage.

local.limiter.max_bytes_hard_percentage

--local-limiter-max-bytes-hard-percentage

QDB_LOCAL_LIMITER_MAX_BYTES_HARD_PERCENTAGE

Hard memory limit as a percentage of the physical memory available to the process. Valid values are 0 through 100. It is mutually exclusive with local.limiter.max_bytes_hard. When both forms are 0, QuasarDB uses 50 percent.

local.limiter.max_bytes_soft_percentage

--local-limiter-max-bytes-soft-percentage

QDB_LOCAL_LIMITER_MAX_BYTES_SOFT_PERCENTAGE

Soft memory limit as a percentage of the physical memory available to the process. Valid values are 0 through 100. It is mutually exclusive with local.limiter.max_bytes_soft. When no valid soft limit below the hard limit is supplied, QuasarDB uses half of the hard limit.

local.limiter.max_trim_queue_length

--local-limiter-max-trim-queue-length

QDB_LOCAL_LIMITER_MAX_TRIM_QUEUE_LENGTH

Maximum number of updated entries queued for asynchronous cache trimming. The minimum is 100000 and the default is 10000000.

local.limiter.max_table_rows_per_shard

--local-limiter-max-table-rows-per-shard

QDB_LOCAL_LIMITER_MAX_TABLE_ROWS_PER_SHARD

Maximum rows allowed in one table shard. 0 means unlimited and is the default; the maximum configured value is 100000000.

local.limiter.memory_statistics_refresh

--local-limiter-memory-statistics-refresh

QDB_LOCAL_LIMITER_MEMORY_STATISTICS_REFRESH

The interval, in milliseconds, at which TBB allocator statistics are refreshed. The default value is 0, which disables this additional allocator instrumentation. To enable it, use a value of at least 1000. Host, resident-cache, and persistence memory gauges do not depend on this option.

local.limiter.soft_eviction_intensity

--local-limiter-soft-eviction-intensity

QDB_LOCAL_LIMITER_SOFT_EVICTION_INTENSITY

Number of entries selected in a soft-eviction pass. 0 selects the current maximum number of concurrent query sessions and is the default.

local.limiter.tbb_huge_threshold

--local-limiter-tbb-huge-threshold

QDB_LOCAL_LIMITER_TBB_HUGE_THRESHOLD

An integer representing the threshold (in bytes) above which memory allocations use huge pages, improving memory performance for large allocations.

local.limiter.tbb_soft_limit

--local-limiter-tbb-soft-limit

QDB_LOCAL_LIMITER_TBB_SOFT_LIMIT

TBB allocator soft heap limit in bytes. 0 selects half of the resolved QuasarDB soft memory limit.

local.limiter.tbb_use_huge_pages

--local-limiter-tbb-use-huge-pages

QDB_LOCAL_LIMITER_TBB_USE_HUGE_PAGES

When set to true, the TBB allocator uses huge pages for memory allocations to improve memory performance for large allocations.

local.limiter.lru2_shard_count

--local-limiter-lru2-shard-count

QDB_LOCAL_LIMITER_LRU2_SHARD_COUNT

Number of shards used by the LRU2 cache. It must be a power of two from 2 through 1024. The default is 8 on 64-bit systems and 2 on 32-bit systems.

2.1.8. Observability#

Config File

Command-Line Argument

Environment Variable

Description

local.logger.log_level

--local-logger-log-level

QDB_LOCAL_LOGGER_LOG_LEVEL

The maximum detail level for log output. Accepted values are detailed, debug, info, warning, error, and panic. The default is info. The debug level also enables separate storage-engine logs.

local.logger.log_directory

--local-logger-log-directory

QDB_LOCAL_LOGGER_LOG_DIRECTORY

Directory for log files. The daemon’s built-in default is empty. Packaged installations normally set it to /var/log/qdb.

local.logger.flush_interval

--local-logger-flush-interval

QDB_LOCAL_LOGGER_FLUSH_INTERVAL

Log flush interval in milliseconds. The minimum is 10 and the default is 3000.

local.logger.log_to_console

--local-logger-log-to-console

QDB_LOCAL_LOGGER_LOG_TO_CONSOLE

Writes log messages to standard output. Enabled by default, although daemon-mode validation can adjust output behavior.

local.logger.log_to_syslog

--local-logger-log-to-syslog

QDB_LOCAL_LOGGER_LOG_TO_SYSLOG

Writes log messages to syslog on supported systems. Disabled by default.

local.logger.json_file_output

--local-logger-json-file-output

QDB_LOCAL_LOGGER_JSON_FILE_OUTPUT

Enables logging in JSON file format. Required to display user properties. Disabled by default.

local.network.profile_performance

--local-network-profile-performance

QDB_LOCAL_NETWORK_PROFILE_PERFORMANCE

Enables performance profiling from the server side, so that clients can start running performance traces. It has a small performance impact, and is disabled by default.

local.debug.log_small_append_percentage

--local-debug-log-small-append-percentage

QDB_LOCAL_DEBUG_LOG_SMALL_APPEND_PERCENTAGE

Logs warning message when pushes increase shard volume by less than set percent. The default value is 0% - logging disabled.

global.cluster.enable_statistics

--global-cluster-enable-statistics

QDB_GLOBAL_CLUSTER_ENABLE_STATISTICS

Enables runtime statistics collected server side. It has a small performance impact and is enabled by default. Statistics cannot be enabled with the transient storage engine.

global.cluster.statistics_refresh_interval

--global-cluster-statistics-refresh-interval

QDB_GLOBAL_CLUSTER_STATISTICS_REFRESH_INTERVAL

Time in milliseconds between normal statistics snapshots. The minimum is 1000 and the default is 5000. This is separate from local.limiter.memory_statistics_refresh for TBB allocator gauges.

2.1.9. Asynchronous time series inserter#

The asynchronous time series inserter buffers inserts in server memory. Use the options in this section to configure the pipelines.

Config File

Command-Line Argument

Environment Variable

Description

local.depot.async_ts.pipelines

--local-depot-async-ts-pipelines

QDB_LOCAL_DEPOT_ASYNC_TS_PIPELINES

The number of asynchronous time series pipelines. The default is 1. Valid values are 0 through 1024. A value of 0 disables async inserts.

local.depot.async_ts.pipeline_buffer_size

--local-depot-async-ts-pipeline-buffer-size

QDB_LOCAL_DEPOT_ASYNC_TS_PIPELINE_BUFFER_SIZE

The maximum buffer size for each pipeline. The default is 1 GiB on 64-bit systems and 100 MiB on 32-bit systems. Valid values are 1 MiB through 128 GiB.

local.depot.async_ts.flush_deadline

--local-depot-async-ts-flush-deadline

QDB_LOCAL_DEPOT_ASYNC_TS_FLUSH_DEADLINE

The maximum time between pipeline flushes. The default is 4 s. Valid values are 1 ms through 24 h.

2.2. QuasarDB Rest Server#

See quasardb REST API for detailed information on configuring the QuasarDB Rest Server, including available options for command line arguments, environmental variables, and JSON config files.

2.3. Docker#

As it can a bit tedious to edit a configuration file inside a Docker container, the bureau14/qdb docker container provides several environment variables you can use to configure the most common configuration options.

Below you find an overview of the different environment variables the image supports:

Variable

Example usage

QDB_LOCAL_USER_LICENSE_KEY

$ docker run -d \
       -e QDB_LOCAL_USER_LICENSE_KEY="$your_license_key" \
       bureau14/qdb

QDB_LOCAL_USER_LICENSE_FILE

$ docker run -d \
       -v /path/to/my/qdb.key:/qdb.key \
       -e QDB_LOCAL_USER_LICENSE_FILE=/qdb.key \
       bureau14/qdb

QDB_LOCAL_NETWORK_LISTEN_ON

$ docker run -d \
       -e QDB_LOCAL_NETWORK_LISTEN_ON=102836 \
       bureau14/qdb

QDB_LOCAL_NETWORK_ADVERTISE_AS

$ docker run -d \
       -e QDB_LOCAL_NETWORK_ADVERTISE_AS="172.16.64.8" \
       bureau14/qdb

QDB_LOCAL_LOGGER_LOG_LEVEL

$ docker run -d \
       -e QDB_LOCAL_LOGGER_LOG_LEVEL=1 \
       bureau14/qdb

QDB_LOCAL_LOGGER_LOG_DIRECTORY

$ docker run -d \
       -v /my/qdb/log/output:/logs \
       -e QDB_LOCAL_LOGGER_LOG_DIRECTORY="/logs" \
       bureau14/qdb

QDB_GLOBAL_SECURITY_CLUSTER_PRIVATE_FILE

$ docker run -d \
       -e QDB_GLOBAL_SECURITY_ENABLED=true \
       \
       -v /path/to/my/qdb/private.key:/private.key \
       -e QDB_GLOBAL_SECURITY_CLUSTER_PRIVATE_FILE=/private.key \
       \
       -e QDB_GLOBAL_SECURITY_USER_LIST=... \
       bureau14/qdb

QDB_GLOBAL_CLUSTER_REPLICATION_FACTOR

$ docker run -d \
       -e QDB_GLOBAL_CLUSTER_REPLICATION_FACTOR=3 \
       \
       bureau14/qdb

QDB_LOCAL_NETWORK_TOTAL_SERVER_SESSIONS

$ docker run -d \
       -e QDB_LOCAL_NETWORK_TOTAL_SERVER_SESSIONS=8192 \
       \
       bureau14/qdb

QDB_LOCAL_NETWORK_PARALLELISM

$ docker run -d \
       --cpu-number=32 \
       -e QDB_LOCAL_NETWORK_PARALLELISM=24 \
       -e QDB_LOCAL_DEPOT_ROCKSDB_THREADS=8 \
       -e QDB_LOCAL_DEPOT_ROCKSDB_HI_THREADS=1 \
       \
       bureau14/qdb

QDB_GLOBAL_CLUSTER_PUBLISH_FIREHOSE

$ docker run -d
       -e QDB_GLOBAL_CLUSTER_PUBLISH_FIREHOSE="true" \
        \
        bureau14/qdb

QDB_LOCAL_NETWORK_FIREHOSE_PUBLISHING_THREADS

$ docker run -d
       -e QDB_GLOBAL_CLUSTER_PUBLISH_FIREHOSE="true" \
       -e QDB_LOCAL_NETWORK_FIREHOSE_PUBLISHING_THREADS=4 \
       \
       bureau14/qdb

QDB_LOCAL_LIMITER_MAX_BYTES_SOFT

$ docker run -d \
           -e QDB_LOCAL_LIMITER_MAX_BYTES_SOFT=17179869184 \
           -e QDB_LOCAL_LIMITER_MAX_BYTES_HARD=25769803776 \
           bureau14/qdb

QDB_LOCAL_LIMITER_MAX_BYTES_HARD

$ docker run -d \
       -e QDB_LOCAL_LIMITER_MAX_BYTES_SOFT=17179869184 \
       -e QDB_LOCAL_LIMITER_MAX_BYTES_HARD=25769803776 \
       bureau14/qdb

QDB_LOCAL_DEPOT_ROCKSDB_THREADS

$ docker run -d \
       -e QDB_LOCAL_DEPOT_ROCKSDB_THREADS=8 \
       bureau14/qdb

QDB_LOCAL_DEPOT_ROCKSDB_HI_THREADS

$ docker run -d \
       -e QDB_LOCAL_DEPOT_ROCKSDB_THREADS=16 \
       -e QDB_LOCAL_DEPOT_ROCKSDB_HI_THREADS=2 \
       bureau14/qdb

QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_PROVIDER

$ docker run -d \
       -e QDB_LOCAL_DEPOT_ROCKSDB_CLOUD_PROVIDER="aws" \
       bureau14/qdb

2.4. Configuring Short-Term Credentials for Amazon S3#

When connecting to Amazon S3 using short-term credentials, it’s essential to properly configure your application. This section guides you through the necessary steps and parameters.

2.4.1. Configuration Parameters#

You need to specify two configuration parameters in your application:

  • rocksdb.cloud.aws.config_file: The name of the configuration file.

  • rocksdb.cloud.aws.config_file_section: The section name in the configuration file.

2.4.2. Format of the Configuration File#

Within the specified configuration file, you need to create a section (e.g., [section_name]) with three key-value pairs:

  • aws_access_key_id: Your AWS access key ID.

  • aws_secret_access_key: Your AWS secret access key.

  • aws_session_token: Your AWS session token (for short-term credentials).

2.4.3. QDBD Configuration#

This section explains how to configure your application for use with short-term credentials in a specific JSON format. It includes the following fields:

"aws": {
                    "config_file": "[credential file path]",
                    "config_file_section": "",
"bucket": {
                    "destination_bucket": "[bucket name]",
                    "path_prefix": "",
                    "region": "",
                    "source_bucket": "[bucket name]"
"use_instance_auth": false,
"provider": "aws",
  • "config_file": The path to the credential file.

  • "config_file_section": The section name in the credential file.

  • "bucket": Configuration related to the S3 bucket.

  • "use_instance_auth": A boolean value indicating whether to use instance authentication (set to false for local machines).

  • "provider": The provider (in this case, “aws”).

2.4.4. Copying Credentials#

It also possible to copy/paste the credential file from either the Command Line or Programmatic Access. It’s a reminder to create a new credential file and not overwrite the default AWS credential file.