Configuration reference
- sharding
- weights
- shard_index
- bucket_count
- collect_bucket_garbage_interval
- collect_lua_garbage
- sync_timeout
- rebalancer_disbalance_threshold
- rebalancer_max_receiving
- rebalancer_max_sending
- discovery_mode
-
sharding
A field defining the logical topology of the sharded Tarantool cluster.
Type: tableDefault: falseDynamic: yes
-
weights
A field defining the configuration of relative weights for each zone pair in a replica set. See the Replica weights section.
Type: tableDefault: falseDynamic: yes
-
shard_index
Name or id of a TREE index over the bucket id. Spaces without this index do not participate in a sharded Tarantool cluster and can be used as regular spaces if needed. It is necessary to specify the first part of the index, other parts are optional.
Type: non-empty string or non-negative integerDefault: “bucket_id”Dynamic: no
-
bucket_count
The total number of buckets in a cluster.
This number should be several orders of magnitude larger than the potential number of cluster nodes, considering potential scaling out in the foreseeable future.
Example:
If the estimated number of nodes is M, then the data set should be divided into 100M or even 1000M buckets, depending on the planned scaling out. This number is certainly greater than the potential number of cluster nodes in the system being designed.
Keep in mind that too many buckets can cause a need to allocate more memory to store routing information. On the other hand, an insufficient number of buckets can lead to decreased granularity when rebalancing.
Type: numberDefault: 3000Dynamic: no
-
collect_bucket_garbage_interval
The interval between garbage collector actions, in seconds.
Type: numberDefault: 0.5Dynamic: yes
-
collect_lua_garbage
If set to true, the Lua
collectgarbage()
function is called periodically.Type: booleanDefault: noDynamic: yes
-
sync_timeout
Timeout to wait for synchronization of the old master with replicas before demotion. Used when switching a master or when manually calling the
sync()
function.Type: numberDefault: 1Dynamic: yes
-
rebalancer_disbalance_threshold
A maximum bucket disbalance threshold, in percent. The threshold is calculated for each replica set using the following formula:
|etalon_bucket_count - real_bucket_count| / etalon_bucket_count * 100
Type: numberDefault: 1Dynamic: yes
-
rebalancer_max_receiving
The maximum number of buckets that can be received in parallel by a single replica set. This number must be limited, because when a new replica set is added to a cluster, the rebalancer sends a very large amount of buckets from the existing replica sets to the new replica set. This produces a heavy load on the new replica set.
Example:
Suppose
rebalancer_max_receiving
is equal to 100,bucket_count
is equal to 1000. There are 3 replica sets with 333, 333 and 334 buckets on each respectively. When a new replica set is added, each replica set’setalon_bucket_count
becomes equal to 250. Rather than receiving all 250 buckets at once, the new replica set receives 100, 100 and 50 buckets sequentially.Type: numberDefault: 100Dynamic: yes
-
rebalancer_max_sending
The degree of parallelism for parallel rebalancing.
Works for storages only, ignored for routers.
The maximum value is
15
.Type: numberDefault: 1Dynamic: yes
-
discovery_mode
A mode of a bucket discovery fiber:
on
/off
/once
. See details below.Type: stringDefault: ‘on’Dynamic: yes
-
weight
A weight of a replica set. See the Replica set weights section for details.
Type:Default: 1Dynamic: