-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcompose.massive.yaml
266 lines (266 loc) · 6.3 KB
/
compose.massive.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
---
# bin/render_compose > compose.massive.yaml
#
# https://developer.redis.com/operate/redis-at-scale/talking-to-redis/initial-tuning/
# https://github.com/redis/redis/blob/unstable/redis.conf
services:
node001: &node
image: "redis:${REDIS_VERSION:-7}"
command: >
redis-server
--maxmemory 32mb
--maxmemory-policy allkeys-lru
--maxmemory-clients 32%
--maxclients 256
--tcp-backlog 1024
--timeout 0
--tcp-keepalive 300
--save ""
--rdb-del-sync-files no
--replica-serve-stale-data yes
--replica-read-only yes
--repl-backlog-size 2mb
--repl-backlog-ttl 0
--repl-disable-tcp-nodelay yes
--repl-diskless-sync yes
--repl-diskless-sync-delay 0
--repl-diskless-sync-max-replicas 0
--repl-diskless-load on-empty-db
--repl-ping-replica-period 60
--repl-timeout 300
--min-replicas-to-write 0
--min-replicas-max-lag 0
--shutdown-timeout 0
--shutdown-on-sigint nosave force now
--shutdown-on-sigterm nosave force now
--client-output-buffer-limit replica 0 0 0
--client-query-buffer-limit 4mb
--appendonly no
--appendfsync no
--cluster-enabled yes
--cluster-config-file nodes.conf
--cluster-node-timeout 300000
--cluster-replica-validity-factor 5
restart: "${RESTART_POLICY:-always}"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: "7s"
timeout: "5s"
retries: 10
ports:
- "6379:6379"
node002:
<<: *node
ports:
- "6380:6379"
node003:
<<: *node
ports:
- "6381:6379"
node004:
<<: *node
ports:
- "6382:6379"
node005:
<<: *node
ports:
- "6383:6379"
node006:
<<: *node
ports:
- "6384:6379"
node007:
<<: *node
ports:
- "6385:6379"
node008:
<<: *node
ports:
- "6386:6379"
node009:
<<: *node
ports:
- "6387:6379"
node010:
<<: *node
ports:
- "6388:6379"
node011:
<<: *node
ports:
- "6389:6379"
node012:
<<: *node
ports:
- "6390:6379"
node013:
<<: *node
ports:
- "6391:6379"
node014:
<<: *node
ports:
- "6392:6379"
node015:
<<: *node
ports:
- "6393:6379"
node016:
<<: *node
ports:
- "6394:6379"
node017:
<<: *node
ports:
- "6395:6379"
node018:
<<: *node
ports:
- "6396:6379"
node019:
<<: *node
ports:
- "6397:6379"
node020:
<<: *node
ports:
- "6398:6379"
node021:
<<: *node
ports:
- "6399:6379"
node022:
<<: *node
ports:
- "6400:6379"
node023:
<<: *node
ports:
- "6401:6379"
node024:
<<: *node
ports:
- "6402:6379"
node025:
<<: *node
ports:
- "6403:6379"
node026:
<<: *node
ports:
- "6404:6379"
node027:
<<: *node
ports:
- "6405:6379"
node028:
<<: *node
ports:
- "6406:6379"
node029:
<<: *node
ports:
- "6407:6379"
node030:
<<: *node
ports:
- "6408:6379"
clustering:
image: "redis:${REDIS_VERSION:-7}"
command: >
bash -c "apt-get update > /dev/null
&& apt-get install --no-install-recommends --no-install-suggests -y dnsutils > /dev/null
&& rm -rf /var/lib/apt/lists/*
&& yes yes | redis-cli --cluster create
$$(dig node001 +short):6379
$$(dig node002 +short):6379
$$(dig node003 +short):6379
$$(dig node004 +short):6379
$$(dig node005 +short):6379
$$(dig node006 +short):6379
$$(dig node007 +short):6379
$$(dig node008 +short):6379
$$(dig node009 +short):6379
$$(dig node010 +short):6379
$$(dig node011 +short):6379
$$(dig node012 +short):6379
$$(dig node013 +short):6379
$$(dig node014 +short):6379
$$(dig node015 +short):6379
$$(dig node016 +short):6379
$$(dig node017 +short):6379
$$(dig node018 +short):6379
$$(dig node019 +short):6379
$$(dig node020 +short):6379
$$(dig node021 +short):6379
$$(dig node022 +short):6379
$$(dig node023 +short):6379
$$(dig node024 +short):6379
$$(dig node025 +short):6379
$$(dig node026 +short):6379
$$(dig node027 +short):6379
$$(dig node028 +short):6379
$$(dig node029 +short):6379
$$(dig node030 +short):6379
--cluster-replicas 2"
depends_on:
node001:
condition: service_healthy
node002:
condition: service_healthy
node003:
condition: service_healthy
node004:
condition: service_healthy
node005:
condition: service_healthy
node006:
condition: service_healthy
node007:
condition: service_healthy
node008:
condition: service_healthy
node009:
condition: service_healthy
node010:
condition: service_healthy
node011:
condition: service_healthy
node012:
condition: service_healthy
node013:
condition: service_healthy
node014:
condition: service_healthy
node015:
condition: service_healthy
node016:
condition: service_healthy
node017:
condition: service_healthy
node018:
condition: service_healthy
node019:
condition: service_healthy
node020:
condition: service_healthy
node021:
condition: service_healthy
node022:
condition: service_healthy
node023:
condition: service_healthy
node024:
condition: service_healthy
node025:
condition: service_healthy
node026:
condition: service_healthy
node027:
condition: service_healthy
node028:
condition: service_healthy
node029:
condition: service_healthy
node030:
condition: service_healthy