]>
Commit | Line | Data |
---|---|---|
ed9b544e | 1 | # Redis configuration file example |
2 | ||
3 | # By default Redis does not run as a daemon. Use 'yes' if you need it. | |
4 | # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. | |
5 | daemonize no | |
6 | ||
ed329fcf LH |
7 | # When run as a daemon, Redis write a pid file in /var/run/redis.pid by default. |
8 | # You can specify a custom pid file location here. | |
9 | pidfile /var/run/redis.pid | |
10 | ||
ed9b544e | 11 | # Accept connections on the specified port, default is 6379 |
12 | port 6379 | |
13 | ||
14 | # If you want you can bind a single interface, if the bind option is not | |
15 | # specified all the interfaces will listen for connections. | |
16 | # | |
17 | # bind 127.0.0.1 | |
18 | ||
19 | # Close the connection after a client is idle for N seconds | |
20 | timeout 300 | |
21 | ||
22 | # Save the DB on disk: | |
23 | # | |
24 | # save <seconds> <changes> | |
25 | # | |
26 | # Will save the DB if both the given number of seconds and the given | |
27 | # number of write operations against the DB occurred. | |
28 | # | |
29 | # In the example below the behaviour will be to save: | |
30 | # after 900 sec (15 min) if at least 1 key changed | |
31 | # after 300 sec (5 min) if at least 10 keys changed | |
32 | # after 60 sec if at least 10000 keys changed | |
33 | save 900 1 | |
34 | save 300 10 | |
35 | save 60 10000 | |
36 | ||
37 | # For default save/load DB in/from the working directory | |
38 | # Note that you must specify a directory not a file name. | |
39 | dir ./ | |
40 | ||
41 | # Set server verbosity to 'debug' | |
42 | # it can be one of: | |
43 | # debug (a lot of information, useful for development/testing) | |
44 | # notice (moderately verbose, what you want in production probably) | |
45 | # warning (only very important / critical messages are logged) | |
46 | loglevel debug | |
47 | ||
48 | # Specify the log file name. Also 'stdout' can be used to force | |
49 | # the demon to log on the standard output. Note that if you use standard | |
50 | # output for logging but daemonize, logs will be sent to /dev/null | |
51 | logfile stdout | |
52 | ||
53 | # Set the number of databases. | |
54 | databases 16 | |
55 | ||
56 | ################################# REPLICATION ################################# | |
57 | ||
58 | # Master-Slave replication. Use slaveof to make a Redis instance a copy of | |
59 | # another Redis server. Note that the configuration is local to the slave | |
60 | # so for example it is possible to configure the slave to save the DB with a | |
61 | # different interval, or to listen to another port, and so on. | |
62 | ||
63 | # slaveof <masterip> <masterport> | |
64 | ||
65 | ############################### ADVANCED CONFIG ############################### | |
66 | ||
67 | # Glue small output buffers together in order to send small replies in a | |
68 | # single TCP packet. Uses a bit more CPU but most of the times it is a win | |
69 | # in terms of number of queries per second. Use 'yes' if unsure. | |
70 | glueoutputbuf yes |