-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredis.cluster.conf
266 lines (213 loc) · 7.11 KB
/
redis.cluster.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
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
# Redis configuration file
# Reference: https://redis.io/docs/manual/config/
# Example file: https://raw.githubusercontent.com/redis/redis/7.0/redis.conf
################################## INCLUDES ###################################
# include /path/to/local.conf
# include /path/to/other.conf
# include /path/to/fragments/*.conf
################################## MODULES #####################################
# loadmodule /path/to/my_module.so
# loadmodule /path/to/other_module.so
################################## NETWORK #####################################
bind 0.0.0.0
# bind-source-addr 10.0.0.1
protected-mode yes
# enable-protected-configs no
# enable-debug-command no
# enable-module-command no
port 0
tcp-backlog 511
# unixsocket /run/redis.sock
# unixsocketperm 700
timeout 300
tcp-keepalive 300
# socket-mark-id 0
################################# TLS/SSL #####################################
# tls-port 6379
tls-cert-file /certs/server.crt
tls-key-file /certs/server.key
# tls-key-file-pass secret
# tls-client-cert-file client.crt
# tls-client-key-file client.key
# tls-client-key-file-pass secret
tls-dh-params-file /certs/redis.dh
tls-ca-cert-file /certs/root_ca.crt
# tls-ca-cert-dir /certs
tls-auth-clients no
# tls-auth-clients optional
tls-replication yes
tls-cluster yes
# tls-protocols "TLSv1.2 TLSv1.3"
# tls-ciphers DEFAULT:!MEDIUM
# tls-ciphersuites TLS_CHACHA20_POLY1305_SHA256
# tls-prefer-server-ciphers yes
# tls-session-caching no
# tls-session-cache-size 5000
# tls-session-cache-timeout 60
################################# GENERAL #####################################
daemonize no
# supervised auto
pidfile /var/run/redis.pid
loglevel notice
# logfile ""
# syslog-enabled no
# syslog-ident redis
# syslog-facility local0
# crash-log-enabled no
# crash-memcheck-enabled no
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
################################ SNAPSHOTTING ################################
# save ""
# save 3600 1 300 100 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
# sanitize-dump-payload no
dbfilename dump.rdb
rdb-del-sync-files no
dir "/data"
################################# REPLICATION #################################
# replicaof redis 6379
# masterauth <master-password>
# masteruser <username>
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0
repl-diskless-load disabled
# repl-ping-replica-period 10
# repl-timeout 60
repl-disable-tcp-nodelay no
# repl-backlog-size 1mb
# repl-backlog-ttl 3600
replica-priority 100
# propagation-error-behavior ignore
# replica-ignore-disk-write-errors no
# replica-announced yes
min-replicas-to-write 2
min-replicas-max-lag 10
# replica-announce-ip 5.5.5.5
# replica-announce-port 1234
############################### KEYS TRACKING #################################
# tracking-table-max-keys 1000000
################################## SECURITY ###################################
user red on +@keyspace +@read +@write +@connection +@pubsub +INFO ~* >Redis@123456
user admin on +@all ~* >4ENaV85jZWlxrlWnDzvB4JyJ
acllog-max-len 128
# aclfile /etc/redis/users.acl
requirepass Dmt7b2PgkOhT5A7A3Q9HsBvz5aGAuQCi
# acl-pubsub-default resetchannels
################################### CLIENTS ####################################
# maxclients 10000
############################## MEMORY MANAGEMENT ################################
# maxmemory <bytes>
# maxmemory-policy noeviction
# maxmemory-samples 5
# maxmemory-eviction-tenacity 10
# replica-ignore-maxmemory yes
# active-expire-effort 1
############################# LAZY FREEING ####################################
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
################################ THREADED I/O #################################
# io-threads 4
# io-threads-do-reads no
############################ KERNEL OOM CONTROL ##############################
oom-score-adj no
oom-score-adj-values 0 200 800
#################### KERNEL transparent hugepage CONTROL ######################
disable-thp yes
############################## APPEND ONLY MODE ###############################
appendonly yes
appendfilename "appendonly.aof"
appenddirname "appendonlydir"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
aof-timestamp-enabled no
################################ SHUTDOWN #####################################
# shutdown-timeout 10
# shutdown-on-sigint default
# shutdown-on-sigterm default
################ NON-DETERMINISTIC LONG BLOCKING COMMANDS #####################
# lua-time-limit 5000
# busy-reply-threshold 5000
################################ REDIS CLUSTER ###############################
cluster-enabled yes
# cluster-config-file redis_cluster.conf
cluster-node-timeout 15000
# cluster-port 0
# cluster-replica-validity-factor 10
# cluster-migration-barrier 1
cluster-allow-replica-migration yes
# cluster-require-full-coverage yes
# cluster-replica-no-failover no
# cluster-allow-reads-when-down no
# cluster-allow-pubsubshard-when-down yes
# cluster-link-sendbuf-limit 0
# cluster-announce-hostname ""
# cluster-preferred-endpoint-type ip
########################## CLUSTER DOCKER/NAT support ########################
# cluster-announce-ip 10.1.1.5
# cluster-announce-tls-port 6379
# cluster-announce-port 0
# cluster-announce-bus-port 6380
################################## SLOW LOG ###################################
slowlog-log-slower-than 10000
slowlog-max-len 128
################################ LATENCY MONITOR ##############################
latency-monitor-threshold 0
################################ LATENCY TRACKING ###################
# latency-tracking yes
# latency-tracking-info-percentiles 50 99 99.9
############################# EVENT NOTIFICATION ##############################
notify-keyspace-events ""
############################### ADVANCED CONFIG ###############################
hash-max-listpack-entries 512
hash-max-listpack-value 64
list-max-listpack-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-listpack-entries 128
zset-max-listpack-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
# client-query-buffer-limit 1gb
# maxmemory-clients 5%
# proto-max-bulk-len 512mb
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
# lfu-log-factor 10
# lfu-decay-time 1
########################### ACTIVE DEFRAGMENTATION #######################
activedefrag yes
active-defrag-ignore-bytes 100mb
active-defrag-threshold-lower 10
active-defrag-threshold-upper 100
active-defrag-cycle-min 1
active-defrag-cycle-max 25
active-defrag-max-scan-fields 1000
jemalloc-bg-thread yes
# server_cpulist 0-7:2
# bio_cpulist 1,3
# aof_rewrite_cpulist 8-11
# bgsave_cpulist 1,10-11
# ignore-warnings ARM64-COW-BUG