raft_kv v0.1.1 RaftKV.Config View Source
RaftKV
defines the following application configs:
:stats_collection_interval
: Interval (in milliseconds) between collections of the following metrics of all shards:- Number of keys in a shard
- Aggregated size of all keys in a shard
Aggregated load which a shard has experienced since the last stats collection
By using smaller value you can adjust (split/merge) number of shards more quickly, with higher overhead. Defaults to
60000
.
:workflow_execution_interval
: Interval (in milliseconds) between executions of workflow tasks. By using smaller value you can execute workflow tasks more quickly, with higher overhead. Defaults to60000
. Workflow task here means:- removing a keyspace
- splitting 1 shard into 2
- merging 2 consecutive shards into 1
:workflow_lock_period
: When executing a workflow task it is locked for this period (in milliseconds) in order to avoid running the same task simultaneously. Defaults to30000
.:shard_ineligible_period_after_split_or_merge
: When a shard has just been split/merged, stats of the affected shard(s) become stale. To prevent from incorrectly splitting/merging based on the stale stats, shards that have been split/merged within this period (in milliseconds) are excluded from next split/merge candidates. Defaults to120000
.
Note that each raft_kv
process uses application configs stored in the local node.
If you want to configure the options above you must set them on all nodes in your cluster.
In addition to the configurations above, the following configurations defined by the underlying libraries are also available:
Link to this section Summary
Link to this section Functions
shard_ineligible_period_after_split_or_merge() :: pos_integer()
stats_collection_interval() :: pos_integer()
workflow_execution_interval() :: pos_integer()