CRDB database config object

An object that represents the database configuration

Redis Software

An object that represents the database configuration. This configuration object is used in two contexts within CRDB objects:

  • As default_db_config in the main CRDB object for settings that apply to all instances. In most cases, instances should use the same configuration.

  • As db_config in individual instance objects to override default_db_config or add configuration values for specific instances. Use db_config only when an instance needs different settings than the default configuration.

default_db_config settings

Requires default_db_config

Use default_db_config to set the following fields so they apply to every instance in the Active-Active database. Do not set these fields in db_config at the instance level because if they differ between instances, replication can fail to start, stop syncing, or return errors.

Name Type/Value Description
module_list array of module objects List of modules to be loaded to all participating clusters of the Active-Active database
[{
"module_id": string,
"module_args": string,
"module_name": string,
"semantic_version": string,
}, ...]

module_id: Module UID (deprecated; use module_name instead)
module_args: Module command-line arguments (pattern does not allow special characters &,<,>,")
module_name: Module's name
semantic_version: Module's semantic version (deprecated; use module_args instead)

module_id and semantic_version are optional as of Redis Software v7.4.2 and deprecated as of v7.8.2.
oss_sharding boolean (default: false) An alternative to shard_key_regex for using the common case of the OSS shard hashing policy
sharding boolean (default: false) Cluster mode (server-side sharding). When true, shard hashing rules must be provided by either oss_sharding or shard_key_regex
shard_key_regex [{ "regex": string }, ...] Custom keyname-based sharding rules (required if sharding is enabled)

To use the default rules you should set the value to:
[{"regex": ".*\\{(?<tag>.*)\\}.*"}, {"regex": "(?<tag>.*)"}]
tls_mode 'enabled'
'disabled'
'replica_ssl'
Encrypt communication

Important to use default_db_config

The following fields don't break replication if they differ between instances, but mismatches can cause problems over time, such as uneven load, higher latency, or inconsistent behavior across clusters. Set them in default_db_config so they apply to every instance in the Active-Active database.

Name Type/Value Description
eviction_policy 'noeviction'
'allkeys-lru'
'allkeys-lfu'
'allkeys-random'
'volatile-lru'
'volatile-lfu'
'volatile-random'
'volatile-ttl'
Database memory eviction policy. See eviction policy for more information.
memory_size integer (default: 0) Database memory size limit in bytes. 0 is unlimited.
oss_cluster boolean (default: false) Enables OSS Cluster mode
oss_cluster_api_preferred_ip_type 'internal'
'external'
Indicates preferred IP type in OSS cluster API
proxy_policy 'single'
'all-master-shards'
'all-nodes'
The policy used for proxy binding to the endpoint
rack_aware boolean (default: false) Require the database to be always replicated across multiple racks
shards_count integer (range: 1-512) (default: 1) Number of database shards
shards_placement 'dense'
'sparse'
Control the density of shards
Values:
'dense': Shards reside on as few nodes as possible
'sparse': Shards reside on as many nodes as possible

The following fields don't break replication or cause future issues if they differ between instances. However, if there is no reason to use different values, you should use default_db_config to set them across all Active-Active database instances.

Name Type/Value Description
aof_policy 'appendfsync-every-sec'
'appendfsync-always'
Policy for Append-Only File data persistence
authentication_redis_pass string Redis AUTH password (deprecated as of Redis Software v7.2, replaced with multiple passwords feature in version 6.0.X)
data_persistence 'disabled'
'snapshot'
'aof'
Database on-disk persistence policy. For snapshot persistence, a snapshot_policy must be provided
max_aof_file_size integer Maximum AOF file size in bytes
max_aof_load_time integer (default: 3600) Maximum AOF reload time in seconds
replication boolean (default: true) Database replication
replication_oom_threshold_percent integer (range: 0-20) (default: 5) Reserved memory buffer percentage below maxmemory that blocks client writes while allowing Active-Active replication. Requires Redis database version 8.4 or later. See Replication OOM protection for more information.
snapshot_policy array of snapshot_policy objects Policy for snapshot-based data persistence. A dataset snapshot will be taken every N secs if there are at least M writes changes in the dataset.

Per-instance db_config settings

Set the following fields in an individual instance's db_config because they are specific to that cluster's environment.

Name Type/Value Description
authentication_admin_pass string Administrative databases access token
authentication_ssl_client_certs array List of authorized client certificates. For Active-Active databases, it is strongly advised to configure the client certificates individually for each instance instead of using the default database configuration, even if the same certificate is used across all instances.
[{
"client_cert": string
}, ...]

client_cert: X.509 PEM (Base64) encoded certificate
cert string Optional PEM-encoded server certificate for the underlying database instance
enforce_client_authentication 'enabled'
'disabled'
Require authentication of client certificates for SSL connections to the database. If enabled, a certificate should be provided in either authentication_ssl_client_certs or authentication_ssl_crdt_certs
mtls_allow_outdated_certs boolean (default: false) An optional mTLS relaxation flag for certs verification
mtls_allow_weak_hashing boolean (default: false) An optional mTLS relaxation flag for certs verification
port integer TCP port for database access
private_key string Optional PEM-encoded private key matching the certificate for the underlying database instance
RATE THIS PAGE
Back to top ↑