-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathasync_replication.conf
75 lines (57 loc) · 2.95 KB
/
async_replication.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## Reindexer async replication configuration sample
# Replication role. May be one of
# none - replication is disabled;
# follower - replication as follower;
# leader - replication as leader.
role: leader
# Replication mode. Allows to configure async replication from sync raft-cluster. This option may be set for each target node individually or globally for all the nodes from config.
# Possible values:
# default - async replication from this node is always enabled, if there are any target nodes to replicate on;
# from_sync_leader - async replication will be enabled only when current node is synchronous RAFT-cluster leader (or if this node does not have any sync cluster config)
replication_mode: default
# Application name used by replicator as a login tag
app_name: rx_node
# Node response timeout for online-replication (seconds)
online_updates_timeout_sec: 20
# Node response timeout for wal/force syncs (seconds)
sync_timeout_sec: 60
# Enable network traffic compression
enable_compression: true
# Force resync on logic error conditions
force_sync_on_logic_error: true
# Force resync on wrong data hash conditions
force_sync_on_wrong_data_hash: false
# Resync timeout on network errors"
retry_sync_interval_msec: 20000
# Number of data replication threads
sync_threads: 4
# Max number of concurrent force/wal sync's per thread
syncs_per_thread: 2
# Number of coroutines for updates batching (per replica). Higher value here may help to reduce
# networks triparound await time, but will require more RAM
batching_routines_count: 100
# Replication log level on replicator's startup. May be changed either via this config (with replication restart) or via config-action
# (upsert '{ "type":"action", "action": { "command": "set_log_level", "type": "async_replication", "level": "info" } }' into #config-namespace).
# Possible values: none, error, warning, info, trace.
log_level: info
# Maximum number of WAL-records, which may be gained from force-sync.
# Increasing this value may help to avoid force-syncs after leader's switch, hovewer it also increases RAM consumetion during syncs
max_wal_depth_on_force_sync: 1000
# Delay between write operation and replication. Larger values here will leader to higher replication latency and bufferization, but also will provide
# more effective network batching and CPU untilization
# 0 - disables additional delay
online_updates_delay_msec: 100
# List of namespaces for replication. If emply, all namespaces
# All replicated namespaces will become read only for followers
# It should be written as YAML sequence, JSON-style arrays are not supported
namespaces: []
# List of nodes for replication.
# It should be written as YAML sequence, JSON-style arrays are not supported
nodes:
-
# Node's DSN. It must to have cproto format
dsn: cproto://192.168.88.10:6534/db1
# Namespaces list is optional. If node doesn't have this parameter, the list from main config will be used
namespaces: []
-
dsn: cproto://192.168.88.11:6534/db1