Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 999 lines (909 sloc) 44.471 kB
ed9b544 @antirez first commit
authored
1 # Redis configuration file example
2
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
3 # Note on units: when memory size is needed, it is possible to specify
7232400 @antirez new units for bytes specification
authored
4 # it in the usual form of 1k 5GB 4M and so forth:
5 #
6 # 1k => 1000 bytes
7 # 1kb => 1024 bytes
8 # 1m => 1000000 bytes
9 # 1mb => 1024*1024 bytes
10 # 1g => 1000000000 bytes
11 # 1gb => 1024*1024*1024 bytes
12 #
13 # units are case insensitive so 1GB 1Gb 1gB are all the same.
14
7da423f @Dieken CONFIG REWRITE: don't throw some options on config rewrite
Dieken authored
15 ################################## INCLUDES ###################################
16
17 # Include one or more other config files here. This is useful if you
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
18 # have a standard template that goes to all Redis servers but also need
7da423f @Dieken CONFIG REWRITE: don't throw some options on config rewrite
Dieken authored
19 # to customize a few per-server settings. Include files can include
20 # other files, so use this wisely.
21 #
22 # Notice option "include" won't be rewritten by command "CONFIG REWRITE"
305d7f2 @antirez Clarify include directive behavior in example redis.conf.
authored
23 # from admin or Redis Sentinel. Since Redis always uses the last processed
24 # line as value of a configuration directive, you'd better put includes
25 # at the beginning of this file to avoid overwriting config change at runtime.
26 #
27 # If instead you are interested in using includes to override configuration
28 # options, it is better to use include as the last line.
7da423f @Dieken CONFIG REWRITE: don't throw some options on config rewrite
Dieken authored
29 #
30 # include /path/to/local.conf
31 # include /path/to/other.conf
32
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
33 ################################## NETWORK #####################################
7da423f @Dieken CONFIG REWRITE: don't throw some options on config rewrite
Dieken authored
34
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
35 # By default, if no "bind" configuration directive is specified, Redis listens
36 # for connections from all the network interfaces available on the server.
37 # It is possible to listen to just one or multiple selected interfaces using
38 # the "bind" configuration directive, followed by one or more IP addresses.
39 #
40 # Examples:
41 #
42 # bind 192.168.1.100 10.0.0.1
43 # bind 127.0.0.1 ::1
44 #
45 # ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
46 # internet, binding to all the interfaces is dangerous and will expose the
47 # instance to everybody on the internet. So by default we uncomment the
48 # following bind directive, that will force Redis to listen only into
49 # the IPv4 lookback interface address (this means Redis will be able to
50 # accept connections only from clients running into the same computer it
51 # is running).
0aa5acc @antirez Give obvious instructions on how to bind all interfaces.
authored
52 #
53 # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
54 # JUST UNCOMMENT THE FOLLOWING LINE.
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
55 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 bind 127.0.0.1
ed329fc @lucsky Allow to specify the pid file from the config file.
lucsky authored
57
066d7a2 @itamarhaber Added reference to IANA ticket for port 6379
itamarhaber authored
58 # Accept connections on the specified port, default is 6379 (IANA #815344).
68d6345 @antirez If port zero is specified, Redis will not listen for TCP connections
authored
59 # If port 0 is specified Redis will not listen on a TCP socket.
ed9b544 @antirez first commit
authored
60 port 6379
61
e40d3e2 @antirez Redis.conf comment about tcp-backlog option improved.
authored
62 # TCP listen() backlog.
63 #
64 # In high requests-per-second environments you need an high backlog in order
65 # to avoid slow clients connections issues. Note that the Linux kernel
66 # will silently truncate it to the value of /proc/sys/net/core/somaxconn so
67 # make sure to raise both the value of somaxconn and tcp_max_syn_backlog
68 # in order to get the desired effect.
7be946f @antirez Option "backlog" renamed "tcp-backlog".
authored
69 tcp-backlog 511
d76aa96 @nmerdan Add support for listen(2) backlog definition
nmerdan authored
70
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
71 # Unix socket.
ed9b544 @antirez first commit
authored
72 #
74da4a5 @antirez Fixed typos in redis.conf file.
authored
73 # Specify the path for the Unix socket that will be used to listen for
5d10923 @pietern Rename variable sockpath to unixsocket
pietern authored
74 # incoming connections. There is no default, so Redis will not listen
75 # on a unix socket when not specified.
a5639e7 @pietern Change initialization to allow listening on both a port and socket
pietern authored
76 #
5d10923 @pietern Rename variable sockpath to unixsocket
pietern authored
77 # unixsocket /tmp/redis.sock
67c4fbe @edgarsi Change unixsocketperm comment to 700 from 755
edgarsi authored
78 # unixsocketperm 700
a5639e7 @pietern Change initialization to allow listening on both a port and socket
pietern authored
79
0150db3 @tmm1 Allow timeout=0 config to disable client timeouts
tmm1 authored
80 # Close the connection after a client is idle for N seconds (0 to disable)
aba4adb @antirez use timeout 0 by default, as this is a common source of problems.
authored
81 timeout 0
ed9b544 @antirez first commit
authored
82
98b1a85 @antirez tcp-keepalive option documented in redis.conf.
authored
83 # TCP keepalive.
84 #
93ae95d @antirez TCP keep-alive. Better documentation in redis.conf.
authored
85 # If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
86 # of communication. This is useful for two reasons:
98b1a85 @antirez tcp-keepalive option documented in redis.conf.
authored
87 #
93ae95d @antirez TCP keep-alive. Better documentation in redis.conf.
authored
88 # 1) Detect dead peers.
89 # 2) Take the connection alive from the point of view of network
90 # equipment in the middle.
91 #
92 # On Linux, the specified value (in seconds) is the period used to send ACKs.
93 # Note that to close the connection the double of the time is needed.
94 # On other kernels the period depends on the kernel configuration.
95 #
96 # A reasonable value for this option is 60 seconds.
98b1a85 @antirez tcp-keepalive option documented in redis.conf.
authored
97 tcp-keepalive 0
98
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
99 ################################# GENERAL #####################################
100
101 # By default Redis does not run as a daemon. Use 'yes' if you need it.
102 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
103 daemonize no
104
105 # If you run Redis from upstart or systemd, Redis can interact with your
106 # supervision tree. Options:
107 # supervised no - no supervision interaction
108 # supervised upstart - signal upstart by putting Redis into SIGSTOP mode
109 # supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
110 # supervised auto - detect upstart or systemd method based on
111 # UPSTART_JOB or NOTIFY_SOCKET environment variables
112 # Note: these supervision methods only signal "process is ready."
113 # They do not enable continuous liveness pings back to your supervisor.
114 supervised no
115
1a93501 @antirez Example redis.conf doc about pidfile fixed.
authored
116 # If a pid file is specified, Redis writes it where specified at startup
117 # and removes it at exit.
118 #
119 # When the server runs non daemonized, no pid file is created if none is
120 # specified in the configuration. When the server is daemonized, the pid file
121 # is used even if not specified, defaulting to "/var/run/redis.pid".
122 #
123 # Creating a pid file is best effort: if Redis is not able to create it
124 # nothing bad happens, the server will start and run normally.
1024664 @antirez Example redis.conf binds just to 127.0.0.1.
authored
125 pidfile /var/run/redis.pid
126
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
127 # Specify the server verbosity level.
128 # This can be one of:
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
129 # debug (a lot of information, useful for development/testing)
38aba9a @antirez a new default redis.conf
authored
130 # verbose (many rarely useful info, but not a mess like the debug level)
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
131 # notice (moderately verbose, what you want in production probably)
132 # warning (only very important / critical messages are logged)
c6f9ee8 @antirez default log level is now notice.
authored
133 loglevel notice
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
134
74da4a5 @antirez Fixed typos in redis.conf file.
authored
135 # Specify the log file name. Also the empty string can be used to force
029245f @antirez clarified a few messages in redis.conf
authored
136 # Redis to log on the standard output. Note that if you use standard
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
137 # output for logging but daemonize, logs will be sent to /dev/null
310dbba @antirez Added a define for most configuration defaults.
authored
138 logfile ""
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
139
e1a586e @jonahharris syslog support
jonahharris authored
140 # To enable logging to the system logger, just set 'syslog-enabled' to yes,
141 # and optionally update the other syslog parameters to suit your needs.
142 # syslog-enabled no
143
144 # Specify the syslog identity.
145 # syslog-ident redis
146
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
147 # Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
e1a586e @jonahharris syslog support
jonahharris authored
148 # syslog-facility local0
149
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
150 # Set the number of databases. The default database is DB 0, you can select
151 # a different one on a per-connection basis using SELECT <dbid> where
152 # dbid is a number between 0 and 'databases'-1
153 databases 16
154
7da423f @Dieken CONFIG REWRITE: don't throw some options on config rewrite
Dieken authored
155 ################################ SNAPSHOTTING ################################
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
156 #
ed9b544 @antirez first commit
authored
157 # Save the DB on disk:
158 #
159 # save <seconds> <changes>
160 #
161 # Will save the DB if both the given number of seconds and the given
162 # number of write operations against the DB occurred.
163 #
164 # In the example below the behaviour will be to save:
165 # after 900 sec (15 min) if at least 1 key changed
166 # after 300 sec (5 min) if at least 10 keys changed
167 # after 60 sec if at least 10000 keys changed
e7546c6 @antirez BGREWRITEAOF now works with swapping on
authored
168 #
df484c7 @manuelmeurer Improve disable save comment in redis.conf
manuelmeurer authored
169 # Note: you can disable saving completely by commenting out all "save" lines.
4aac3ff @antirez It is now posible to flush all the previous saving points in redis.co…
authored
170 #
171 # It is also possible to remove all the previously configured save
172 # points by adding a save directive with a single empty string argument
173 # like in the following example:
174 #
175 # save ""
e7546c6 @antirez BGREWRITEAOF now works with swapping on
authored
176
38aba9a @antirez a new default redis.conf
authored
177 save 900 1
178 save 300 10
179 save 60 10000
ed9b544 @antirez first commit
authored
180
4d3bbf3 @antirez By default Redis refuses writes with an error if the latest BGSAVE fa…
authored
181 # By default Redis will stop accepting writes if RDB snapshots are enabled
182 # (at least one save point) and the latest background save failed.
74da4a5 @antirez Fixed typos in redis.conf file.
authored
183 # This will make the user aware (in a hard way) that data is not persisting
4d3bbf3 @antirez By default Redis refuses writes with an error if the latest BGSAVE fa…
authored
184 # on disk properly, otherwise chances are that no one will notice and some
74da4a5 @antirez Fixed typos in redis.conf file.
authored
185 # disaster will happen.
4d3bbf3 @antirez By default Redis refuses writes with an error if the latest BGSAVE fa…
authored
186 #
187 # If the background saving process will start working again Redis will
188 # automatically allow writes again.
189 #
190 # However if you have setup your proper monitoring of the Redis server
191 # and persistence, you may want to disable this feature so that Redis will
74431b8 @AnuragRamdasan Fixed grammar: 'usually' to 'usual'
AnuragRamdasan authored
192 # continue to work as usual even if there are problems with disk,
4d3bbf3 @antirez By default Redis refuses writes with an error if the latest BGSAVE fa…
authored
193 # permissions, and so forth.
194 stop-writes-on-bgsave-error yes
195
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
196 # Compress string objects using LZF when dump .rdb databases?
b055378 @antirez LZF compression re-enabled by default, but with INIT_HTAB set to 0 to…
authored
197 # For default that's set to 'yes' as it's almost always a win.
198 # If you want to save some CPU in the saving child set it to 'no' but
199 # the dataset will likely be bigger if you have compressible values or keys.
200 rdbcompression yes
121f70c @antirez lzf compression switched off by default now, with config file option …
authored
201
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
202 # Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
84bcd3a @antirez It is now possible to enable/disable RDB checksum computation from re…
authored
203 # This makes the format more resistant to corruption but there is a performance
204 # hit to pay (around 10%) when saving and loading RDB files, so you can disable it
205 # for maximum performances.
206 #
207 # RDB files created with checksum disabled have a checksum of zero that will
208 # tell the loading code to skip the check.
209 rdbchecksum yes
210
b8b553c @antirez ability to specify a different file name for the DB
authored
211 # The filename where to dump the DB
212 dbfilename dump.rdb
213
029245f @antirez clarified a few messages in redis.conf
authored
214 # The working directory.
215 #
216 # The DB will be written inside this directory, with the filename specified
217 # above using the 'dbfilename' configuration directive.
12d0195 @mattsta Clean up text throughout project
mattsta authored
218 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
219 # The Append Only File will also be created inside this directory.
12d0195 @mattsta Clean up text throughout project
mattsta authored
220 #
029245f @antirez clarified a few messages in redis.conf
authored
221 # Note that you must specify a directory here, not a file name.
ed9b544 @antirez first commit
authored
222 dir ./
223
224 ################################# REPLICATION #################################
225
226 # Master-Slave replication. Use slaveof to make a Redis instance a copy of
49c817c @antirez Example redis.conf: improve slaveof description.
authored
227 # another Redis server. A few things to understand ASAP about Redis replication.
228 #
229 # 1) Redis replication is asynchronous, but you can configure a master to
230 # stop accepting writes if it appears to be not connected with at least
231 # a given number of slaves.
232 # 2) Redis slaves are able to perform a partial resynchronization with the
233 # master if the replication link is lost for a relatively small amount of
234 # time. You may want to configure the replication backlog size (see the next
235 # sections of this file) with a sensible value depending on your needs.
236 # 3) Replication is automatic and does not need user intervention. After a
237 # network partition slaves automatically try to reconnect to masters
238 # and resynchronize with them.
3f47797 @antirez TODO list modified. What's planned for 1.4 is now written in the ston…
authored
239 #
ed9b544 @antirez first commit
authored
240 # slaveof <masterip> <masterport>
241
3f47797 @antirez TODO list modified. What's planned for 1.4 is now written in the ston…
authored
242 # If the master is password protected (using the "requirepass" configuration
243 # directive below) it is possible to tell the slave to authenticate before
244 # starting the replication synchronization process, otherwise the master will
245 # refuse the slave request.
246 #
247 # masterauth <master-password>
248
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
249 # When a slave loses its connection with the master, or when the replication
4ebfc45 @antirez config option to select if when replication link with master a slave …
authored
250 # is still in progress, the slave can act in two different ways:
251 #
252 # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
92a157e @jerem Fixed a typo in comments.
jerem authored
253 # still reply to client requests, possibly with out of date data, or the
4ebfc45 @antirez config option to select if when replication link with master a slave …
authored
254 # data set may just be empty if this is the first synchronization.
255 #
d783860 @stamhe point 2 of slave-serve-stale-data miss '-' between 'stale' and 'data'
stamhe authored
256 # 2) if slave-serve-stale-data is set to 'no' the slave will reply with
4ebfc45 @antirez config option to select if when replication link with master a slave …
authored
257 # an error "SYNC with master in progress" to all the kind of commands
258 # but to INFO and SLAVEOF.
259 #
260 slave-serve-stale-data yes
261
f3fd419 @antirez Support for read-only slaves. Semantical fixes.
authored
262 # You can configure a slave instance to accept writes or not. Writing against
263 # a slave instance may be useful to store some ephemeral data (because data
264 # written on a slave will be easily deleted after resync with the master) but
ba864e0 @antirez Comments about security of slave-read-only in redis.coinf.
authored
265 # may also cause problems if clients are writing to it because of a
266 # misconfiguration.
f3fd419 @antirez Support for read-only slaves. Semantical fixes.
authored
267 #
268 # Since Redis 2.6 by default slaves are read-only.
ba864e0 @antirez Comments about security of slave-read-only in redis.coinf.
authored
269 #
270 # Note: read only slaves are not designed to be exposed to untrusted clients
271 # on the internet. It's just a protection layer against misuse of the instance.
272 # Still a read only slave exports by default all the administrative commands
fb6b9b1 @AnuragRamdasan fixed typo
AnuragRamdasan authored
273 # such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
ba864e0 @antirez Comments about security of slave-read-only in redis.coinf.
authored
274 # security of read only slaves using 'rename-command' to shadow all the
275 # administrative / dangerous commands.
f3fd419 @antirez Support for read-only slaves. Semantical fixes.
authored
276 slave-read-only yes
277
18de539 @antirez Diskless replication documented inside example redis.conf.
authored
278 # Replication SYNC strategy: disk or socket.
279 #
e07dd8b @antirez Mark diskless replication as experimental in redis.conf.
authored
280 # -------------------------------------------------------
281 # WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY
282 # -------------------------------------------------------
283 #
18de539 @antirez Diskless replication documented inside example redis.conf.
authored
284 # New slaves and reconnecting slaves that are not able to continue the replication
285 # process just receiving differences, need to do what is called a "full
286 # synchronization". An RDB file is transmitted from the master to the slaves.
287 # The transmission can happen in two different ways:
288 #
289 # 1) Disk-backed: The Redis master creates a new process that writes the RDB
290 # file on disk. Later the file is transferred by the parent
291 # process to the slaves incrementally.
292 # 2) Diskless: The Redis master creates a new process that directly writes the
293 # RDB file to slave sockets, without touching the disk at all.
294 #
295 # With disk-backed replication, while the RDB file is generated, more slaves
296 # can be queued and served with the RDB file as soon as the current child producing
297 # the RDB file finishes its work. With diskless replication instead once
298 # the transfer starts, new slaves arriving will be queued and a new transfer
299 # will start when the current one terminates.
300 #
301 # When diskless replication is used, the master waits a configurable amount of
302 # time (in seconds) before starting the transfer in the hope that multiple slaves
303 # will arrive and the transfer can be parallelized.
304 #
305 # With slow disks and fast (large bandwidth) networks, diskless replication
306 # works better.
307 repl-diskless-sync no
308
3b9a979 @antirez Document repl-diskless-sync-delay in redis.conf.
authored
309 # When diskless replication is enabled, it is possible to configure the delay
6df9001 @mariano-perez-rodriguez Typo fixes in redis.conf
mariano-perez-rodriguez authored
310 # the server waits in order to spawn the child that transfers the RDB via socket
3b9a979 @antirez Document repl-diskless-sync-delay in redis.conf.
authored
311 # to the slaves.
312 #
313 # This is important since once the transfer starts, it is not possible to serve
314 # new slaves arriving, that will be queued for the next RDB transfer, so the server
315 # waits a delay in order to let more slaves arrive.
316 #
317 # The delay is specified in seconds, and by default is 5 seconds. To disable
318 # it entirely just set it to 0 seconds and the transfer will start ASAP.
319 repl-diskless-sync-delay 5
320
8996bf7 @antirez 7c6da73
authored
321 # Slaves send PINGs to server in a predefined interval. It's possible to change
322 # this interval with the repl_ping_slave_period option. The default value is 10
323 # seconds.
324 #
f15e33a fixed typo in comments
Herbert G. Fischer authored
325 # repl-ping-slave-period 10
8996bf7 @antirez 7c6da73
authored
326
c9b55a2 @antirez redis.conf updated: repl-timeout now uesd by masters as well.
authored
327 # The following option sets the replication timeout for:
328 #
329 # 1) Bulk transfer I/O during SYNC, from the point of view of slave.
330 # 2) Master timeout from the point of view of slaves (data, pings).
331 # 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
8996bf7 @antirez 7c6da73
authored
332 #
85ccd57 @antirez added more clarifications in redis.conf about ther right value to set…
authored
333 # It is important to make sure that this value is greater than the value
334 # specified for repl-ping-slave-period otherwise a timeout will be detected
335 # every time there is low traffic between the master and the slave.
336 #
f15e33a fixed typo in comments
Herbert G. Fischer authored
337 # repl-timeout 60
8996bf7 @antirez 7c6da73
authored
338
b70b459 @antirez TCP_NODELAY after SYNC: changes to the implementation.
authored
339 # Disable TCP_NODELAY on the slave socket after SYNC?
340 #
341 # If you select "yes" Redis will use a smaller number of TCP packets and
342 # less bandwidth to send data to slaves. But this can add a delay for
343 # the data to appear on the slave side, up to 40 milliseconds with
344 # Linux kernels using a default configuration.
345 #
346 # If you select "no" the delay for data to appear on the slave side will
347 # be reduced but more bandwidth will be used for replication.
348 #
349 # By default we optimize for low latency, but in very high traffic conditions
350 # or when the master and slaves are many hops away, turning this to "yes" may
351 # be a good idea.
352 repl-disable-tcp-nodelay no
353
0788820 @antirez PSYNC: work in progress, preview #2, rebased to unstable.
authored
354 # Set the replication backlog size. The backlog is a buffer that accumulates
355 # slave data when slaves are disconnected for some time, so that when a slave
356 # wants to reconnect again, often a full resync is not needed, but a partial
357 # resync is enough, just passing the portion of data the slave missed while
358 # disconnected.
359 #
aa62844 @badboy Fix typo in redis.conf
badboy authored
360 # The bigger the replication backlog, the longer the time the slave can be
0788820 @antirez PSYNC: work in progress, preview #2, rebased to unstable.
authored
361 # disconnected and later be able to perform a partial resynchronization.
362 #
363 # The backlog is only allocated once there is at least a slave connected.
364 #
365 # repl-backlog-size 1mb
366
367 # After a master has no longer connected slaves for some time, the backlog
368 # will be freed. The following option configures the amount of seconds that
369 # need to elapse, starting from the time the last slave disconnected, for
370 # the backlog buffer to be freed.
371 #
372 # A value of 0 means to never release the backlog.
373 #
374 # repl-backlog-ttl 3600
375
712656e @antirez Sentinel: added documentation about slave-priority in redis.conf
authored
376 # The slave priority is an integer number published by Redis in the INFO output.
377 # It is used by Redis Sentinel in order to select a slave to promote into a
378 # master if the master is no longer working correctly.
379 #
380 # A slave with a low priority number is considered better for promotion, so
381 # for instance if there are three slaves with priority 10, 100, 25 Sentinel will
74da4a5 @antirez Fixed typos in redis.conf file.
authored
382 # pick the one with priority 10, that is the lowest.
712656e @antirez Sentinel: added documentation about slave-priority in redis.conf
authored
383 #
384 # However a special priority of 0 marks the slave as not able to perform the
385 # role of master, so a slave with priority of 0 will never be selected by
386 # Redis Sentinel for promotion.
387 #
388 # By default the priority is 100.
389 slave-priority 100
390
cbdb215 @antirez min-slaves-to-write: initial description of the feature in redis.conf
authored
391 # It is possible for a master to stop accepting writes if there are less than
392 # N slaves connected, having a lag less or equal than M seconds.
393 #
394 # The N slaves need to be in "online" state.
395 #
396 # The lag in seconds, that must be <= the specified value, is calculated from
397 # the last ping received from the slave, that is usually sent every second.
398 #
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
399 # This option does not GUARANTEE that N replicas will accept the write, but
cbdb215 @antirez min-slaves-to-write: initial description of the feature in redis.conf
authored
400 # will limit the window of exposure for lost writes in case not enough slaves
401 # are available, to the specified number of seconds.
402 #
403 # For example to require at least 3 slaves with a lag <= 10 seconds use:
404 #
ed599d3 @antirez min-slaves-to-write: don't accept writes with less than N replicas.
authored
405 # min-slaves-to-write 3
406 # min-slaves-max-lag 10
407 #
408 # Setting one or the other to 0 disables the feature.
409 #
410 # By default min-slaves-to-write is set to 0 (feature disabled) and
411 # min-slaves-max-lag is set to 10.
cbdb215 @antirez min-slaves-to-write: initial description of the feature in redis.conf
authored
412
f2aa84b @antirez Lua client added thanks to Daniele Alessandri
authored
413 ################################## SECURITY ###################################
414
415 # Require clients to issue AUTH <PASSWORD> before processing any other
416 # commands. This might be useful in environments in which you do not trust
417 # others with access to the host running redis-server.
418 #
419 # This should stay commented out for backward compatibility and because most
420 # people do not need auth (e.g. they run their own servers).
12d0195 @mattsta Clean up text throughout project
mattsta authored
421 #
1b67773 @antirez CONFIG now can change appendfsync policy at run time
authored
422 # Warning: since Redis is pretty fast an outside user can try up to
423 # 150k passwords per second against a good box. This means that you should
424 # use a very strong password otherwise it will be very easy to break.
3f47797 @antirez TODO list modified. What's planned for 1.4 is now written in the ston…
authored
425 #
290deb8 @antirez TODO changes, minor change to default redis.conf
authored
426 # requirepass foobared
f2aa84b @antirez Lua client added thanks to Daniele Alessandri
authored
427
8d3e063 @antirez added support for command renaming/suppression in redis.conf
authored
428 # Command renaming.
429 #
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
430 # It is possible to change the name of dangerous commands in a shared
8d3e063 @antirez added support for command renaming/suppression in redis.conf
authored
431 # environment. For instance the CONFIG command may be renamed into something
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
432 # hard to guess so that it will still be available for internal-use tools
433 # but not available for general clients.
8d3e063 @antirez added support for command renaming/suppression in redis.conf
authored
434 #
435 # Example:
436 #
437 # rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
438 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
439 # It is also possible to completely kill a command by renaming it into
8d3e063 @antirez added support for command renaming/suppression in redis.conf
authored
440 # an empty string:
441 #
442 # rename-command CONFIG ""
4d62912 @antirez Add a warning about command renaming in redis.conf.
authored
443 #
444 # Please note that changing the name of commands that are logged into the
445 # AOF file or transmitted to slaves may cause problems.
8d3e063 @antirez added support for command renaming/suppression in redis.conf
authored
446
285add5 @antirez maxclients implemented, see redis.conf for details
authored
447 ################################### LIMITS ####################################
448
58732c2 @antirez maxclients configuration is now implemented dealing with the actual p…
authored
449 # Set the max number of connected clients at the same time. By default
450 # this limit is set to 10000 clients, however if the Redis server is not
9d09ce3 @guiquanz Fixed many typos.
guiquanz authored
451 # able to configure the process file limit to allow for the specified limit
58732c2 @antirez maxclients configuration is now implemented dealing with the actual p…
authored
452 # the max number of allowed clients is set to the current file limit
453 # minus 32 (as Redis reserves a few file descriptors for internal uses).
454 #
285add5 @antirez maxclients implemented, see redis.conf for details
authored
455 # Once the limit is reached Redis will close all the new connections sending
456 # an error 'max number of clients reached'.
3f47797 @antirez TODO list modified. What's planned for 1.4 is now written in the ston…
authored
457 #
58732c2 @antirez maxclients configuration is now implemented dealing with the actual p…
authored
458 # maxclients 10000
285add5 @antirez maxclients implemented, see redis.conf for details
authored
459
3fd78bc @antirez maxmemory implemented
authored
460 # Don't use more memory than the specified amount of bytes.
cebb7b9 @antirez redis.conf updated with new maxmemory semantics
authored
461 # When the memory limit is reached Redis will try to remove keys
8534a29 @antirez Fixed typo in redis.conf.
authored
462 # according to the eviction policy selected (see maxmemory-policy).
cebb7b9 @antirez redis.conf updated with new maxmemory semantics
authored
463 #
464 # If Redis can't remove keys according to the policy, or if the policy is
465 # set to 'noeviction', Redis will start to reply with errors to commands
466 # that would use more memory, like SET, LPUSH, and so on, and will continue
467 # to reply to read-only commands like GET.
468 #
469 # This option is usually useful when using Redis as an LRU cache, or to set
74da4a5 @antirez Fixed typos in redis.conf file.
authored
470 # a hard memory limit for an instance (using the 'noeviction' policy).
cebb7b9 @antirez redis.conf updated with new maxmemory semantics
authored
471 #
472 # WARNING: If you have slaves attached to an instance with maxmemory on,
473 # the size of the output buffers needed to feed the slaves are subtracted
474 # from the used memory count, so that network problems / resyncs will
475 # not trigger a loop where keys are evicted, and in turn the output
476 # buffer of slaves is full with DELs of keys evicted triggering the deletion
477 # of more keys, and so forth until the database is completely emptied.
3f47797 @antirez TODO list modified. What's planned for 1.4 is now written in the ston…
authored
478 #
f9ef912 @antirez more practical maxmemory+slaves hint in redis.conf
authored
479 # In short... if you have slaves attached it is suggested that you set a lower
480 # limit for maxmemory so that there is some free RAM on the system for slave
481 # output buffers (but this is not needed if the policy is 'noeviction').
482 #
3fd78bc @antirez maxmemory implemented
authored
483 # maxmemory <bytes>
484
165346c @antirez implemented different algorithms for maxmemory
authored
485 # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
486 # is reached. You can select among five behaviors:
12d0195 @mattsta Clean up text throughout project
mattsta authored
487 #
165346c @antirez implemented different algorithms for maxmemory
authored
488 # volatile-lru -> remove the key with an expire set using an LRU algorithm
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
489 # allkeys-lru -> remove any key according to the LRU algorithm
165346c @antirez implemented different algorithms for maxmemory
authored
490 # volatile-random -> remove a random key with an expire set
96e9f8d fix typo of redis.conf
quiver authored
491 # allkeys-random -> remove a random key, any key
165346c @antirez implemented different algorithms for maxmemory
authored
492 # volatile-ttl -> remove the key with the nearest expire time (minor TTL)
5402c42 @antirez added noeviction policy to redis maxmemory. ZSCORE removed from the l…
authored
493 # noeviction -> don't expire at all, just return an error on write operations
12d0195 @mattsta Clean up text throughout project
mattsta authored
494 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
495 # Note: with any of the above policies, Redis will return an error on write
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
496 # operations, when there are no suitable keys for eviction.
5402c42 @antirez added noeviction policy to redis maxmemory. ZSCORE removed from the l…
authored
497 #
be00616 @mparramont redis.conf small grammar fix
mparramont authored
498 # At the date of writing these commands are: set setnx setex append
5402c42 @antirez added noeviction policy to redis maxmemory. ZSCORE removed from the l…
authored
499 # incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
500 # sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
501 # zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
502 # getset mset msetnx exec sort
503 #
504 # The default is:
165346c @antirez implemented different algorithms for maxmemory
authored
505 #
5fa3248 @antirez The default maxmemory policy is now noeviction.
authored
506 # maxmemory-policy noeviction
165346c @antirez implemented different algorithms for maxmemory
authored
507
508 # LRU and minimal TTL algorithms are not precise algorithms but approximated
f4da796 @antirez Default LRU samples is now 5.
authored
509 # algorithms (in order to save memory), so you can tune it for speed or
510 # accuracy. For default Redis will check five keys and pick the one that was
511 # used less recently, you can change the sample size using the following
512 # configuration directive.
165346c @antirez implemented different algorithms for maxmemory
authored
513 #
f4da796 @antirez Default LRU samples is now 5.
authored
514 # The default of 5 produces good enough results. 10 Approximates very closely
515 # true LRU but costs a bit more CPU. 3 is very fast but not very accurate.
516 #
517 # maxmemory-samples 5
165346c @antirez implemented different algorithms for maxmemory
authored
518
44b38ef @antirez Initial implementation of append-only mode. Loading still not impleme…
authored
519 ############################## APPEND ONLY MODE ###############################
520
60e2e5b @antirez redis.conf AOF section comments improved.
authored
521 # By default Redis asynchronously dumps the dataset on disk. This mode is
522 # good enough in many applications, but an issue with the Redis process or
523 # a power outage may result into a few minutes of writes lost (depending on
524 # the configured save points).
525 #
526 # The Append Only File is an alternative persistence mode that provides
527 # much better durability. For instance using the default data fsync policy
528 # (see later in the config file) Redis can lose just one second of writes in a
529 # dramatic event like a server power outage, or a single write if something
530 # wrong with the Redis process itself happens, but the operating system is
531 # still running correctly.
532 #
533 # AOF and RDB persistence can be enabled at the same time without problems.
534 # If the AOF is enabled on startup Redis will load the AOF, that is the file
535 # with the better durability guarantees.
536 #
537 # Please check http://redis.io/topics/persistence for more information.
44b38ef @antirez Initial implementation of append-only mode. Loading still not impleme…
authored
538
4e141d5 @antirez append only mode is now able to translate EXPIRE into EXPIREAT transp…
authored
539 appendonly no
44b38ef @antirez Initial implementation of append-only mode. Loading still not impleme…
authored
540
f3b5241 @pietern make append only filename configurable
pietern authored
541 # The name of the append only file (default: "appendonly.aof")
6d184e0 @antirez Example redis.conf formatted to better show appendfilename option.
authored
542
543 appendfilename "appendonly.aof"
f3b5241 @pietern make append only filename configurable
pietern authored
544
4e141d5 @antirez append only mode is now able to translate EXPIRE into EXPIREAT transp…
authored
545 # The fsync() call tells the Operating System to actually write data on disk
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
546 # instead of waiting for more data in the output buffer. Some OS will really flush
48f0308 @antirez support for appendonly mode no, always, everysec
authored
547 # data on disk, some other OS will just try to do it ASAP.
548 #
549 # Redis supports three different modes:
550 #
551 # no: don't fsync, just let the OS flush the data when it wants. Faster.
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
552 # always: fsync after every write to the append only log. Slow, Safest.
60e2e5b @antirez redis.conf AOF section comments improved.
authored
553 # everysec: fsync only one time every second. Compromise.
48f0308 @antirez support for appendonly mode no, always, everysec
authored
554 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
555 # The default is "everysec", as that's usually the right compromise between
6766f45 @antirez multi bulk requests in redis-benchmark, default fsync policy changed …
authored
556 # speed and data safety. It's up to you to understand if you can relax this to
ce6628d @diegok Fixed a config docs typo.
diegok authored
557 # "no" that will let the operating system flush the output buffer when
6766f45 @antirez multi bulk requests in redis-benchmark, default fsync policy changed …
authored
558 # it wants, for better performances (but if you can live with the idea of
559 # some data loss consider the default persistence mode that's snapshotting),
560 # or on the contrary, use "always" that's very slow but a bit safer than
561 # everysec.
562 #
60e2e5b @antirez redis.conf AOF section comments improved.
authored
563 # More details please check the following article:
564 # http://antirez.com/post/redis-persistence-demystified.html
565 #
6766f45 @antirez multi bulk requests in redis-benchmark, default fsync policy changed …
authored
566 # If unsure, use "everysec".
567
568 # appendfsync always
569 appendfsync everysec
4e141d5 @antirez append only mode is now able to translate EXPIRE into EXPIREAT transp…
authored
570 # appendfsync no
48f0308 @antirez support for appendonly mode no, always, everysec
authored
571
d5d23da @antirez redis.conf new features the new option, a minor typo preventing the c…
authored
572 # When the AOF fsync policy is set to always or everysec, and a background
573 # saving process (a background save or AOF log background rewriting) is
574 # performing a lot of I/O against the disk, in some Linux configurations
575 # Redis may block too long on the fsync() call. Note that there is no fix for
576 # this currently, as even performing fsync in a different thread will block
577 # our synchronous write(2) call.
578 #
579 # In order to mitigate this problem it's possible to use the following option
580 # that will prevent fsync() from being called in the main process while a
581 # BGSAVE or BGREWRITEAOF is in progress.
582 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
583 # This means that while another child is saving, the durability of Redis is
584 # the same as "appendfsync none". In practical terms, this means that it is
585 # possible to lose up to 30 seconds of log in the worst scenario (with the
d5d23da @antirez redis.conf new features the new option, a minor typo preventing the c…
authored
586 # default Linux settings).
12d0195 @mattsta Clean up text throughout project
mattsta authored
587 #
d5d23da @antirez redis.conf new features the new option, a minor typo preventing the c…
authored
588 # If you have latency problems turn this to "yes". Otherwise leave it as
589 # "no" that is the safest pick from the point of view of durability.
6d184e0 @antirez Example redis.conf formatted to better show appendfilename option.
authored
590
d5d23da @antirez redis.conf new features the new option, a minor typo preventing the c…
authored
591 no-appendfsync-on-rewrite no
592
b333e23 @antirez automatic AOF rewrite first implementation. Still to be tested.
authored
593 # Automatic rewrite of the append only file.
594 # Redis is able to automatically rewrite the log file implicitly calling
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
595 # BGREWRITEAOF when the AOF log size grows by the specified percentage.
12d0195 @mattsta Clean up text throughout project
mattsta authored
596 #
b333e23 @antirez automatic AOF rewrite first implementation. Still to be tested.
authored
597 # This is how it works: Redis remembers the size of the AOF file after the
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
598 # latest rewrite (if no rewrite has happened since the restart, the size of
b333e23 @antirez automatic AOF rewrite first implementation. Still to be tested.
authored
599 # the AOF at startup is used).
600 #
601 # This base size is compared to the current size. If the current size is
602 # bigger than the specified percentage, the rewrite is triggered. Also
603 # you need to specify a minimal size for the AOF file to be rewritten, this
604 # is useful to avoid rewriting the AOF file even if the percentage increase
605 # is reached but it is still pretty small.
606 #
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
607 # Specify a percentage of zero in order to disable the automatic AOF
b333e23 @antirez automatic AOF rewrite first implementation. Still to be tested.
authored
608 # rewrite feature.
609
610 auto-aof-rewrite-percentage 100
611 auto-aof-rewrite-min-size 64mb
612
31f79a4 @antirez Make aof-load-truncated option actually configurable.
authored
613 # An AOF file may be found to be truncated at the end during the Redis
614 # startup process, when the AOF data gets loaded back into memory.
615 # This may happen when the system where Redis is running
616 # crashes, especially when an ext4 filesystem is mounted without the
617 # data=ordered option (however this can't happen when Redis itself
618 # crashes or aborts but the operating system still works correctly).
619 #
620 # Redis can either exit with an error when this happens, or load as much
621 # data as possible (the default now) and start if the AOF file is found
622 # to be truncated at the end. The following option controls this behavior.
623 #
624 # If aof-load-truncated is set to yes, a truncated AOF file is loaded and
625 # the Redis server starts emitting a log to inform the user of the event.
626 # Otherwise if the option is set to no, the server aborts with an error
627 # and refuses to start. When the option is set to no, the user requires
628 # to fix the AOF file using the "redis-check-aof" utility before to restart
629 # the server.
630 #
631 # Note that if the AOF file will be found to be corrupted in the middle
632 # the server will still exit with an error. This option only applies when
633 # Redis will try to read more data from the AOF file but not enough bytes
634 # will be found.
635 aof-load-truncated yes
636
eeffcf3 @antirez Lua scripts max execution time
authored
637 ################################ LUA SCRIPTING ###############################
638
639 # Max execution time of a Lua script in milliseconds.
115e3ff @antirez If a Lua script executes for more time than the max time specified in…
authored
640 #
641 # If the maximum execution time is reached Redis will log that a script is
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
642 # still in execution after the maximum allowed time and will start to
115e3ff @antirez If a Lua script executes for more time than the max time specified in…
authored
643 # reply to queries with an error.
644 #
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
645 # When a long running script exceeds the maximum execution time only the
0b14e44 @antirez redis.conf updated to reflect the new scripting timeout semantics.
authored
646 # SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
647 # used to stop a script that did not yet called write commands. The second
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
648 # is the only way to shut down the server in the case a write command was
649 # already issued by the script but the user doesn't want to wait for the natural
0b14e44 @antirez redis.conf updated to reflect the new scripting timeout semantics.
authored
650 # termination of the script.
115e3ff @antirez If a Lua script executes for more time than the max time specified in…
authored
651 #
652 # Set it to 0 or a negative value for unlimited execution without warnings.
653 lua-time-limit 5000
eeffcf3 @antirez Lua scripts max execution time
authored
654
07c152a @antirez cluster config file entries added to the example configuration file
authored
655 ################################ REDIS CLUSTER ###############################
656 #
4235766 @antirez Advertise Redis Cluster as experimental in redis.conf.
authored
657 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
658 # WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however
659 # in order to mark it as "mature" we need to wait for a non trivial percentage
660 # of users to deploy it in production.
661 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
662 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
663 # Normal Redis instances can't be part of a Redis Cluster; only nodes that are
07c152a @antirez cluster config file entries added to the example configuration file
authored
664 # started as cluster nodes can. In order to start a Redis instance as a
665 # cluster node enable the cluster support uncommenting the following:
666 #
667 # cluster-enabled yes
668
669 # Every cluster node has a cluster configuration file. This file is not
670 # intended to be edited by hand. It is created and updated by Redis nodes.
671 # Every Redis Cluster node requires a different cluster configuration file.
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
672 # Make sure that instances running in the same system do not have
07c152a @antirez cluster config file entries added to the example configuration file
authored
673 # overlapping cluster configuration file names.
674 #
675 # cluster-config-file nodes-6379.conf
676
12d0195 @mattsta Clean up text throughout project
mattsta authored
677 # Cluster node timeout is the amount of milliseconds a node must be unreachable
05fa4f4 @antirez Cluster: node timeout is now configurable.
authored
678 # for it to be considered in failure state.
e5864c7 @antirez Cluster: example redis.conf updated from sec to ms for cluster-node-t…
authored
679 # Most other internal time limits are multiple of the node timeout.
05fa4f4 @antirez Cluster: node timeout is now configurable.
authored
680 #
e5864c7 @antirez Cluster: example redis.conf updated from sec to ms for cluster-node-t…
authored
681 # cluster-node-timeout 15000
05fa4f4 @antirez Cluster: node timeout is now configurable.
authored
682
39603a7 @antirez Cluster: slave validity factor is now user configurable.
authored
683 # A slave of a failing master will avoid to start a failover if its data
684 # looks too old.
685 #
686 # There is no simple way for a slave to actually have a exact measure of
687 # its "data age", so the following two checks are performed:
688 #
689 # 1) If there are multiple slaves able to failover, they exchange messages
690 # in order to try to give an advantage to the slave with the best
691 # replication offset (more data from the master processed).
692 # Slaves will try to get their rank by offset, and apply to the start
693 # of the failover a delay proportional to their rank.
694 #
695 # 2) Every single slave computes the time of the last interaction with
696 # its master. This can be the last ping or command received (if the master
697 # is still in the "connected" state), or the time that elapsed since the
698 # disconnection with the master (if the replication link is currently down).
699 # If the last interaction is too old, the slave will not try to failover
700 # at all.
701 #
702 # The point "2" can be tuned by user. Specifically a slave will not perform
703 # the failover if, since the last interaction with the master, the time
704 # elapsed is greater than:
705 #
706 # (node-timeout * slave-validity-factor) + repl-ping-slave-period
707 #
708 # So for example if node-timeout is 30 seconds, and the slave-validity-factor
709 # is 10, and assuming a default repl-ping-slave-period of 10 seconds, the
710 # slave will not try to failover if it was not able to talk with the master
711 # for longer than 310 seconds.
712 #
713 # A large slave-validity-factor may allow slaves with too old data to failover
714 # a master, while a too small value may prevent the cluster from being able to
715 # elect a slave at all.
716 #
717 # For maximum availability, it is possible to set the slave-validity-factor
718 # to a value of 0, which means, that slaves will always try to failover the
719 # master regardless of the last time they interacted with the master.
720 # (However they'll always try to apply a delay proportional to their
721 # offset rank).
722 #
723 # Zero is the only value able to guarantee that when all the partitions heal
724 # the cluster will always be able to continue.
725 #
726 # cluster-slave-validity-factor 10
727
a7d3068 @antirez Cluster: configurable replicas migration barrier.
authored
728 # Cluster slaves are able to migrate to orphaned masters, that are masters
729 # that are left without working slaves. This improves the cluster ability
730 # to resist to failures as otherwise an orphaned master can't be failed over
731 # in case of failure if it has no working slaves.
732 #
733 # Slaves migrate to orphaned masters only if there are still at least a
734 # given number of other working slaves for their old master. This number
cbfdd13 @antirez Cluster: barrer -> barrier in redis.conf.
authored
735 # is the "migration barrier". A migration barrier of 1 means that a slave
a7d3068 @antirez Cluster: configurable replicas migration barrier.
authored
736 # will migrate only if there is at least 1 other working slave for its master
737 # and so forth. It usually reflects the number of slaves you want for every
738 # master in your cluster.
739 #
740 # Default is 1 (slaves migrate only if their masters remain with at least
b8bfbf4 @antirez Cluster: fix an error in migration-barrier comment in redis.conf.
authored
741 # one slave). To disable migration just set it to a very large value.
a7d3068 @antirez Cluster: configurable replicas migration barrier.
authored
742 # A value of 0 can be set but is useful only for debugging and dangerous
743 # in production.
744 #
745 # cluster-migration-barrier 1
746
c89afc8 @antirez Cluster: new option to work with partial slots coverage.
authored
747 # By default Redis Cluster nodes stop accepting queries if they detect there
748 # is at least an hash slot uncovered (no available node is serving it).
749 # This way if the cluster is partially down (for example a range of hash slots
750 # are no longer covered) all the cluster becomes, eventually, unavailable.
751 # It automatically returns available as soon as all the slots are covered again.
752 #
753 # However sometimes you want the subset of the cluster which is working,
754 # to continue to accept queries for the part of the key space that is still
755 # covered. In order to do so, just set the cluster-require-full-coverage
756 # option to no.
757 #
758 # cluster-require-full-coverage yes
759
07c152a @antirez cluster config file entries added to the example configuration file
authored
760 # In order to setup your cluster make sure to read the documentation
761 # available at http://redis.io web site.
762
35a6044 @antirez slow log configuration implemented
authored
763 ################################## SLOW LOG ###################################
764
765 # The Redis Slow Log is a system to log queries that exceeded a specified
766 # execution time. The execution time does not include the I/O operations
767 # like talking with the client, sending the reply and so forth,
768 # but just the time needed to actually execute the command (this is the only
769 # stage of command execution where the thread is blocked and can not serve
770 # other requests in the meantime).
12d0195 @mattsta Clean up text throughout project
mattsta authored
771 #
35a6044 @antirez slow log configuration implemented
authored
772 # You can configure the slow log with two parameters: one tells Redis
773 # what is the execution time, in microseconds, to exceed in order for the
774 # command to get logged, and the other parameter is the length of the
775 # slow log. When a new command is logged the oldest one is removed from the
776 # queue of logged commands.
777
de32c37 @antirez More redis.conf self-documentation. Now even queries that took exactl…
authored
778 # The following time is expressed in microseconds, so 1000000 is equivalent
779 # to one second. Note that a negative number disables the slow log, while
780 # a value of zero forces the logging of every command.
35a6044 @antirez slow log configuration implemented
authored
781 slowlog-log-slower-than 10000
de32c37 @antirez More redis.conf self-documentation. Now even queries that took exactl…
authored
782
783 # There is no limit to this length. Just be aware that it will consume memory.
784 # You can reclaim memory used by the slow log with SLOWLOG RESET.
d3701d2 @antirez Limit memory used by big SLOWLOG entries.
authored
785 slowlog-max-len 128
35a6044 @antirez slow log configuration implemented
authored
786
e173f7a @antirez Latency monitor trheshold value is now configurable.
authored
787 ################################ LATENCY MONITOR ##############################
788
789 # The Redis latency monitoring subsystem samples different operations
790 # at runtime in order to collect data related to possible sources of
791 # latency of a Redis instance.
792 #
793 # Via the LATENCY command this information is available to the user that can
794 # print graphs and obtain reports.
795 #
796 # The system only logs operations that were performed in a time equal or
797 # greater than the amount of milliseconds specified via the
798 # latency-monitor-threshold configuration directive. When its value is set
799 # to zero, the latency monitor is turned off.
800 #
801 # By default latency monitoring is disabled since it is mostly not needed
802 # if you don't have latency issues, and collecting data has a performance
803 # impact, that while very small, can be measured under big load. Latency
6df9001 @mariano-perez-rodriguez Typo fixes in redis.conf
mariano-perez-rodriguez authored
804 # monitoring can easily be enabled at runtime using the command
e173f7a @antirez Latency monitor trheshold value is now configurable.
authored
805 # "CONFIG SET latency-monitor-threshold <milliseconds>" if needed.
806 latency-monitor-threshold 0
807
2b3eba0 @MasahikoSawada Unify to uppercase the headline
MasahikoSawada authored
808 ############################# EVENT NOTIFICATION ##############################
4cdbce3 @antirez Keyspace events notification API.
authored
809
810 # Redis can notify Pub/Sub clients about events happening in the key space.
c90af7c @veselov * fixed doc URL for keyspace events
veselov authored
811 # This feature is documented at http://redis.io/topics/notifications
12d0195 @mattsta Clean up text throughout project
mattsta authored
812 #
4cdbce3 @antirez Keyspace events notification API.
authored
813 # For instance if keyspace events notification is enabled, and a client
814 # performs a DEL operation on key "foo" stored in the Database 0, two
815 # messages will be published via Pub/Sub:
816 #
817 # PUBLISH __keyspace@0__:foo del
818 # PUBLISH __keyevent@0__:del foo
819 #
fce016d @antirez Keyspace events: it is now possible to select subclasses of events.
authored
820 # It is possible to select the events that Redis will notify among a set
821 # of classes. Every class is identified by a single character:
822 #
823 # K Keyspace events, published with __keyspace@<db>__ prefix.
824 # E Keyevent events, published with __keyevent@<db>__ prefix.
825 # g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
826 # $ String commands
827 # l List commands
828 # s Set commands
829 # h Hash commands
830 # z Sorted set commands
831 # x Expired events (events generated every time a key expires)
832 # e Evicted events (events generated when a key is evicted for maxmemory)
833 # A Alias for g$lshzxe, so that the "AKE" string means all the events.
834 #
835 # The "notify-keyspace-events" takes as argument a string that is composed
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
836 # of zero or multiple characters. The empty string means that notifications
837 # are disabled.
fce016d @antirez Keyspace events: it is now possible to select subclasses of events.
authored
838 #
839 # Example: to enable list and generic events, from the point of view of the
840 # event name, use:
841 #
842 # notify-keyspace-events Elg
843 #
844 # Example 2: to get the stream of the expired keys subscribing to channel
845 # name __keyevent@0__:expired use:
846 #
847 # notify-keyspace-events Ex
848 #
849 # By default all notifications are disabled because most users don't need
850 # this feature and the feature has some overhead. Note that if you don't
851 # specify at least one of K or E, no events will be delivered.
852 notify-keyspace-events ""
4cdbce3 @antirez Keyspace events notification API.
authored
853
ed9b544 @antirez first commit
authored
854 ############################### ADVANCED CONFIG ###############################
855
d3ea4c8 @pietern Update default configuration
pietern authored
856 # Hashes are encoded using a memory efficient data structure when they have a
857 # small number of entries, and the biggest entry does not exceed a given
858 # threshold. These thresholds can be configured using the following directives.
859 hash-max-ziplist-entries 512
860 hash-max-ziplist-value 64
b3f83f1 @jzawodn support for include directive in config parser
jzawodn authored
861
02bb515 @mattsta Config: Add quicklist, remove old list options
mattsta authored
862 # Lists are also encoded in a special way to save a lot of space.
863 # The number of entries allowed per internal list node can be specified
864 # as a fixed maximum size or a maximum number of elements.
865 # For a fixed maximum size, use -5 through -1, meaning:
866 # -5: max size: 64 Kb <-- not recommended for normal workloads
867 # -4: max size: 32 Kb <-- not recommended
868 # -3: max size: 16 Kb <-- probably not recommended
869 # -2: max size: 8 Kb <-- good
870 # -1: max size: 4 Kb <-- good
871 # Positive numbers mean store up to _exactly_ that number of elements
872 # per list node.
873 # The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size),
874 # but if your use case is unique, adjust the settings as necessary.
875 list-max-ziplist-size -2
876
877 # Lists may also be compressed.
878 # Compress depth is the number of quicklist ziplist nodes from *each* side of
879 # the list to *exclude* from compression. The head and tail of the list
880 # are always uncompressed for fast push/pop operations. Settings are:
881 # 0: disable all list compression
882 # 1: depth 1 means "don't start compressing until after 1 node into the list,
883 # going from either the head or tail"
884 # So: [head]->node->node->...->node->[tail]
885 # [head], [tail] will always be uncompressed; inner nodes will compress.
886 # 2: [head]->[next]->node->node->...->node->[prev]->[tail]
887 # 2 here means: don't compress head or head->next or tail->prev or tail,
888 # but compress all nodes between them.
889 # 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail]
890 # etc.
891 list-compress-depth 0
6a246b1 @antirez special encoding limits redefined, and all the config options for spe…
authored
892
893 # Sets have a special encoding in just one case: when a set is composed
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
894 # of just strings that happen to be integers in radix 10 in the range
6a246b1 @antirez special encoding limits redefined, and all the config options for spe…
authored
895 # of 64 bit signed integers.
896 # The following configuration setting sets the limit in the size of the
897 # set in order to use this special memory saving encoding.
898 set-max-intset-entries 512
899
3ea204e @pietern Configurable thresholds for encoded sorted sets
pietern authored
900 # Similarly to hashes and lists, sorted sets are also specially encoded in
901 # order to save a lot of space. This encoding is only used when the length and
902 # elements of a sorted set are below the following limits:
903 zset-max-ziplist-entries 128
904 zset-max-ziplist-value 64
905
402110f @antirez User-defined switch point between sparse-dense HLL encodings.
authored
906 # HyperLogLog sparse representation bytes limit. The limit includes the
907 # 16 bytes header. When an HyperLogLog using the sparse representation crosses
12e435d @nirvdrum Fixed typos.
nirvdrum authored
908 # this limit, it is converted into the dense representation.
402110f @antirez User-defined switch point between sparse-dense HLL encodings.
authored
909 #
910 # A value greater than 16000 is totally useless, since at that point the
911 # dense representation is more memory efficient.
12d0195 @mattsta Clean up text throughout project
mattsta authored
912 #
402110f @antirez User-defined switch point between sparse-dense HLL encodings.
authored
913 # The suggested value is ~ 3000 in order to have the benefits of
914 # the space efficient encoding without slowing down too much PFADD,
12e435d @nirvdrum Fixed typos.
nirvdrum authored
915 # which is O(N) with the sparse encoding. The value can be raised to
402110f @antirez User-defined switch point between sparse-dense HLL encodings.
authored
916 # ~ 10000 when CPU is not a concern, but space is, and the data set is
917 # composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
918 hll-sparse-max-bytes 3000
919
8ca3e9d @antirez Active rehashing
authored
920 # Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
921 # order to help rehashing the main Redis hash table (the one mapping top-level
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
922 # keys to values). The hash table implementation Redis uses (see dict.c)
74da4a5 @antirez Fixed typos in redis.conf file.
authored
923 # performs a lazy rehashing: the more operation you run into a hash table
57c0cf8 @kashif Fixed some typos in redis.conf.
kashif authored
924 # that is rehashing, the more rehashing "steps" are performed, so if the
8ca3e9d @antirez Active rehashing
authored
925 # server is idle the rehashing is never complete and some more memory is used
926 # by the hash table.
12d0195 @mattsta Clean up text throughout project
mattsta authored
927 #
8ca3e9d @antirez Active rehashing
authored
928 # The default is to use this millisecond 10 times every second in order to
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
929 # actively rehash the main dictionaries, freeing memory when possible.
8ca3e9d @antirez Active rehashing
authored
930 #
931 # If unsure:
932 # use "activerehashing no" if you have hard latency requirements and it is
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
933 # not a good thing in your environment that Redis can reply from time to time
8ca3e9d @antirez Active rehashing
authored
934 # to queries with 2 milliseconds delay.
935 #
936 # use "activerehashing yes" if you don't have such hard requirements but
937 # want to free memory asap when possible.
938 activerehashing yes
939
c8a607f @antirez client-output-buffer-limit documented in redis.conf
authored
940 # The client output buffer limits can be used to force disconnection of clients
941 # that are not reading data from the server fast enough for some reason (a
942 # common reason is that a Pub/Sub client can't consume messages as fast as the
943 # publisher can produce them).
944 #
945 # The limit can be set differently for the three different classes of clients:
946 #
56d26c2 @antirez Client types generalized.
authored
947 # normal -> normal clients including MONITOR clients
948 # slave -> slave clients
6d5fa2e @Dieken fix typo in redis.conf and sentinel.conf
Dieken authored
949 # pubsub -> clients subscribed to at least one pubsub channel or pattern
c8a607f @antirez client-output-buffer-limit documented in redis.conf
authored
950 #
951 # The syntax of every client-output-buffer-limit directive is the following:
952 #
3cbce4f @antirez redis.conf typo fixed in the client-output-buffer-limit documentation
authored
953 # client-output-buffer-limit <class> <hard limit> <soft limit> <soft seconds>
c8a607f @antirez client-output-buffer-limit documented in redis.conf
authored
954 #
955 # A client is immediately disconnected once the hard limit is reached, or if
956 # the soft limit is reached and remains reached for the specified number of
957 # seconds (continuously).
958 # So for instance if the hard limit is 32 megabytes and the soft limit is
959 # 16 megabytes / 10 seconds, the client will get disconnected immediately
960 # if the size of the output buffers reach 32 megabytes, but will also get
961 # disconnected if the client reaches 16 megabytes and continuously overcomes
962 # the limit for 10 seconds.
963 #
964 # By default normal clients are not limited because they don't receive data
965 # without asking (in a push way), but just after a request, so only
966 # asynchronous clients may create a scenario where data is requested faster
967 # than it can read.
968 #
969 # Instead there is a default limit for pubsub and slave clients, since
970 # subscribers and slaves receive data in a push fashion.
971 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
972 # Both the hard or the soft limit can be disabled by setting them to zero.
c8a607f @antirez client-output-buffer-limit documented in redis.conf
authored
973 client-output-buffer-limit normal 0 0 0
974 client-output-buffer-limit slave 256mb 64mb 60
975 client-output-buffer-limit pubsub 32mb 8mb 60
976
f1481d4 @antirez serverCron() frequency is now a runtime parameter (was REDIS_HZ).
authored
977 # Redis calls an internal function to perform many background tasks, like
74da4a5 @antirez Fixed typos in redis.conf file.
authored
978 # closing connections of clients in timeout, purging expired keys that are
f1481d4 @antirez serverCron() frequency is now a runtime parameter (was REDIS_HZ).
authored
979 # never requested, and so forth.
980 #
8114464 @davidcelis Fix a few typos and improve grammar of redis.conf
davidcelis authored
981 # Not all tasks are performed with the same frequency, but Redis checks for
f62f00e @wuddup Grammar and typo fixes in redis.conf
wuddup authored
982 # tasks to perform according to the specified "hz" value.
f1481d4 @antirez serverCron() frequency is now a runtime parameter (was REDIS_HZ).
authored
983 #
984 # By default "hz" is set to 10. Raising the value will use more CPU when
985 # Redis is idle, but at the same time will make Redis more responsive when
986 # there are many keys expiring at the same time, and timeouts may be
987 # handled with more precision.
988 #
989 # The range is between 1 and 500, however a value over 100 is usually not
990 # a good idea. Most users should use the default of 10 and raise this up to
991 # 100 only in environments where very low latency is required.
992 hz 10
993
d264122 @antirez Config option to turn AOF rewrite incremental fsync on/off.
authored
994 # When a child rewrites the AOF file, if the following option is enabled
995 # the file will be fsync-ed every 32 MB of data generated. This is useful
996 # in order to commit the file to the disk more incrementally and avoid
997 # big latency spikes.
998 aof-rewrite-incremental-fsync yes
Something went wrong with that request. Please try again.