-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathsharding.conf
85 lines (75 loc) · 2.32 KB
/
sharding.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
75
76
77
78
79
80
81
82
83
84
## Reindexer sharding configuration sample
# Version of config file format
version: 1
# Sharding keys description: ns, index + keys of sharding
namespaces:
- namespace: namespace1
# Default shard ID. This shard will contain all the sharding key values, which were not set explicitly in this config to other shards
default_shard: 0
index: count
keys:
- shard_id: 1
values:
- 0
# '- [begin, end]' - this means that all records with keys from begin to end inclusive will get into this shard
- [7, 10]
- [13, 21]
- shard_id: 2
values:
- 1
- 2
- 3
- 4
- shard_id: 3
values:
- 11
- namespace: namespace2
default_shard: 3
index: city
keys:
- shard_id: 1
values:
- Moscow
- shard_id: 2
values:
- London
- shard_id: 3
values:
- Paris
# Sharding nodes description
shards:
# Id of this shard: should be unique,
# each node in cluster has this value.
- shard_id: 0
dsns:
- cproto://127.0.0.1:19000/shard0
- cproto://127.0.0.1:19001/shard0
- cproto://127.0.0.1:19002/shard0
- shard_id: 1
dsns:
- cproto://127.0.0.1:19010/shard1
- cproto://127.0.0.1:19011/shard1
- shard_id: 2
dsns:
- cproto://127.0.0.2:19020/shard2
- shard_id: 3
dsns:
- cproto://127.0.0.2:19030/shard3
- cproto://127.0.0.2:19031/shard3
- cproto://127.0.0.2:19032/shard3
- cproto://127.0.0.2:19033/shard3
# This shard ID - ID of current shard,
# one of the Ids described in section "shards".
this_shard_id: 0
# Reconnect timeout for single node (time limit for status-request)
reconnect_timeout_msec: 3000
# Await timeout for operations, distributed over every shard (for example, OpenNamespace or AddIndex).
# This timeout is required, because shards may not start at the exact same time, however some operations require all of them being online
# 0 - disables awaiting mechanism and -1 means "unlimited timeout"
shards_awaiting_timeout_sec: 30
# Count of proxying connections to each other shard (1-64)
proxy_conn_count: 8
# Count of concurrent requests for each proxy connection (1-1024)
proxy_conn_concurrency: 8
# Count of proxying threads for proxy-clients
proxy_conn_threads: 4