-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathicingadb-redis.conf.j2
230 lines (208 loc) · 8.26 KB
/
icingadb-redis.conf.j2
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
{{ ansible_managed | comment }}
bind {% for host in icingadb_redis_binds %}
{{ host }}
{%- if not loop.last %} {% endif %}
{% endfor %}
protected-mode {{ icingadb_redis_protected_mode | string }}
port {{ icingadb_redis_port }}
{% if icingadb_redis_tls_port is defined %}
tls-port {{ icingadb_redis_tls_port }}
{% endif %}
tcp-backlog {{ icingadb_redis_tcp_backlog }}
timeout {{ icingadb_redis_timeout }}
tcp-keepalive {{ icingadb_redis_tcp_keepalive }}
supervised {{ icingadb_redis_supervised }}
pidfile {{ icingadb_redis_pidfile }}
loglevel {{ icingadb_redis_loglevel }}
logfile "{{ icingadb_redis_logfile }}"
# syslog-enabled no
# syslog-ident redis
# syslog-facility local0
databases {{ icingadb_redis_databases }}
always-show-logo {{ icingadb_redis_always_show_logo }}
{% if icingadb_redis_password is defined %}
requirepass {{ icingadb_redis_password }}
{% endif %}
################################ SNAPSHOTTING ################################
#
# Save the DB on disk:
#
# save <seconds> <changes>
#
# Will save the DB if both the given number of seconds and the given
# number of write operations against the DB occurred.
#
# In the example below the behaviour will be to save:
# after 900 sec (15 min) if at least 1 key changed
# after 300 sec (5 min) if at least 10 keys changed
# after 60 sec if at least 10000 keys changed
#
# Note: you can disable saving completely by commenting out all "save" lines.
#
# It is also possible to remove all the previously configured save
# points by adding a save directive with a single empty string argument
# like in the following example:
#
# save ""
{% for save in icingadb_redis_save %}
save {{ save }}
{% endfor %}
stop-writes-on-bgsave-error {{ icingadb_redis_stop_writes_on_bgsave_error }}
rdbcompression {{ icingadb_redis_rdbcompression }}
rdbchecksum {{ icingadb_redis_rdbchecksum }}
dbfilename {{ icingadb_redis_dbfilename }}
dir {{ icingadb_redis_dir }}
# replicaof <masterip> <masterport>
# masterauth <master-password>
replica-serve-stale-data {{ icingadb_redis_replica_serve_stale_data }}
replica-read-only {{ icingadb_redis_replica_read_only }}
repl-diskless-sync {{ icingadb_redis_repl_diskless_sync }}
repl-diskless-sync-delay {{ icingadb_redis_repl_diskless_sync_delay }}
# repl-ping-replica-period 10
# repl-timeout 60
repl-disable-tcp-nodelay {{ icingadb_redis_repl_disable_tcp_nodelay }}
# repl-backlog-size 1mb
# repl-backlog-ttl 3600
replica-priority {{ icingadb_redis_replica_priority }}
# min-replicas-max-lag is set to 10.
# replica-announce-ip 5.5.5.5
# replica-announce-port 1234
# requirepass foobared
# Example:
#
# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
#
# It is also possible to completely kill a command by renaming it into
# an empty string:
#
# rename-command CONFIG ""
# maxclients 10000
# maxmemory <bytes>
# maxmemory-policy noeviction
# maxmemory-samples 5
# replica-ignore-maxmemory yes
lazyfree-lazy-eviction {{ icingadb_redis_lazyfree_lazy_eviction }}
lazyfree-lazy-expire {{ icingadb_redis_lazyfree_lazy_expire }}
lazyfree-lazy-server-del {{ icingadb_redis_lazyfree_lazy_server_del }}
replica-lazy-flush {{ icingadb_redis_lazy_flush }}
############################## APPEND ONLY MODE ###############################
appendonly {{ icingadb_redis_appendonly }}
# The name of the append only file (default: "appendonly.aof")
appendfilename "{{ icingadb_redis_appendfilename }}"
# appendfsync always
appendfsync {{ icingadb_redis_appendfsync }}
# appendfsync no
no-appendfsync-on-rewrite {{ icingadb_redis_no_appendfsync_on_rewrite }}
auto-aof-rewrite-percentage {{ icingadb_redis_auto_aof_rewrite_percentage }}
auto-aof-rewrite-min-size {{ icingadb_redis_auto_aof_rewrite_min_size }}
aof-load-truncated {{ icingadb_redis_aof_load_truncated }}
aof-use-rdb-preamble {{ icingadb_redis_aof_use_rdb_preamble }}
################################ LUA SCRIPTING ###############################
lua-time-limit {{ icingadb_redis_lua_time_limit }}
################################ REDIS CLUSTER ###############################
# cluster-enabled yes
# cluster-config-file nodes-6379.conf
# cluster-node-timeout 15000
# cluster-replica-validity-factor 10
# cluster-migration-barrier 1
# cluster-require-full-coverage yes
# cluster-replica-no-failover no
########################## CLUSTER DOCKER/NAT support ########################
# Example:
#
# cluster-announce-ip 10.1.1.5
# cluster-announce-port 6379
# cluster-announce-bus-port 6380
################################## SLOW LOG ###################################
slowlog-log-slower-than {{ icingadb_slowlog_log_slower_than }}
slowlog-max-len {{ icingadb_slowlog_max_len }}
################################ LATENCY MONITOR ##############################
latency-monitor-threshold {{ icingadb_redis_latency_monitor_threshold }}
############################# EVENT NOTIFICATION ##############################
# Redis can notify Pub/Sub clients about events happening in the key space.
# This feature is documented at http://redis.io/topics/notifications
#
# For instance if keyspace events notification is enabled, and a client
# performs a DEL operation on key "foo" stored in the Database 0, two
# messages will be published via Pub/Sub:
#
# PUBLISH __keyspace@0__:foo del
# PUBLISH __keyevent@0__:del foo
#
# It is possible to select the events that Redis will notify among a set
# of classes. Every class is identified by a single character:
#
# K Keyspace events, published with __keyspace@<db>__ prefix.
# E Keyevent events, published with __keyevent@<db>__ prefix.
# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
# $ String commands
# l List commands
# s Set commands
# h Hash commands
# z Sorted set commands
# x Expired events (events generated every time a key expires)
# e Evicted events (events generated when a key is evicted for maxmemory)
# A Alias for g$lshzxe, so that the "AKE" string means all the events.
#
# The "notify-keyspace-events" takes as argument a string that is composed
# of zero or multiple characters. The empty string means that notifications
# are disabled.
#
# Example: to enable list and generic events, from the point of view of the
# event name, use:
#
# notify-keyspace-events Elg
#
# Example 2: to get the stream of the expired keys subscribing to channel
# name __keyevent@0__:expired use:
#
# notify-keyspace-events Ex
#
# By default all notifications are disabled because most users don't need
# this feature and the feature has some overhead. Note that if you don't
# specify at least one of K or E, no events will be delivered.
notify-keyspace-events ""
############################### ADVANCED CONFIG ###############################
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
{% for buff in icingadb_redis_client_output_buffer_limits %}
client-output-buffer-limit {{ buff }}
{% endfor %}
# client-query-buffer-limit 1gb
# proto-max-bulk-len 512mb
hz {{ icingadb_redis_hz }}
dynamic-hz {{ icingadb_redis_dynamic_hz }}
aof-rewrite-incremental-fsync {{ icingadb_redis_aof_rewrite_incremental_fsync }}
rdb-save-incremental-fsync {{ icingadb_redis_rdb_save_incremental_fsync }}
# lfu-log-factor 10
# lfu-decay-time 1
########################### ACTIVE DEFRAGMENTATION #######################
# activedefrag yes
# Minimum amount of fragmentation waste to start active defrag
# active-defrag-ignore-bytes 100mb
# Minimum percentage of fragmentation to start active defrag
# active-defrag-threshold-lower 10
# Maximum percentage of fragmentation at which we use maximum effort
# active-defrag-threshold-upper 100
# Minimal effort for defrag in CPU percentage
# active-defrag-cycle-min 5
# Maximal effort for defrag in CPU percentage
# active-defrag-cycle-max 75
# Maximum number of set/hash/zset/list fields that will be processed from
# the main dictionary scan
# active-defrag-max-scan-fields 1000
# TLS
{% if icingadb_redis_tls_cert is defined and icingadb_redis_tls_ca is defined and icingadb_redis_tls_key is defined %}
tls-cert-file {{ icingadb_redis_tls_cert }}
tls-key-file {{ icingadb_redis_tls_key }}
tls-ca-cert-file {{ icingadb_redis_tls_ca }}
{% endif %}