Redis configuration file details, redis configuration file

Source: Internet
Author: User

Redis configuration file details, redis configuration file
# Whether to run the subsequent processes. The default value is no.
Daemonize yes
# If a later process runs, you must specify a pid. The default value is/var/run/redis. pid.
Pidfile d:/redis/var/redis. pid
# Listening port. The default value is 6379.
Port 6379
# Bind the Host IP address. The default value is 127.0.0.1 (note)
# Bind 127.0.0.1
# Timeout time. The default value is 300 (seconds) (0 to disable)
Timeout 300
# Log record level, with four optional values: debug, verbose (default), notice, and warning
Loglevel verbose
# Log recording method. The default value is stdout.
Logfile stdout
# Number of available databases; default value: 16; default value: 0
Databases 16


################################ Snapsho ####### ##########################
#
# Save the DB on disk:
# Indicates how long and how many update operations are performed, and the data is synchronized to the data file. This can be used with multiple conditions. For example, three conditions are set in the default configuration file.
# At least one key is changed within 900 seconds (15 minutes)
Save 900 1
# At least 10 keys are changed within 300 seconds (5 minutes)
Save 300 10
# At least 10000 keys are changed in 60 seconds
Save 60 10000
# Whether to compress the data stored in the local database. The default value is yes.
Rdbcompression yes
# Local database file name, default value: dump. rdb
Dbfilename dump. rdb
# Local database storage path. The default value is ./
Dir d:/redis/var
# Whether to block the "change operation" of the client when an error occurs during snapshot and the client cannot continue? The "error" may be due to Disk Full/disk failure/OS-level exception.
Stop-writes-on-bgsave-error yes


################################# REPLICATION ###### ###########################


# When the local machine is a slave service, set the IP address and port of the master service (note)
# Slaveof <masterip> <masterport>
# When the local machine is a slave service, set the connection password of the master service (note)
# Masterauth <master-password>


################################## SECURITY ##### ##############################


# Connection password (comment)
Requrequirepass 123


################################### LIMITS #### ################################


# Maximum number of client connections. The default value is '0' means no limits.
# Maxclients 128
# Set the maximum memory. When the maximum memory is reached, Redis will first try to clear expired or expiring keys. After this method is processed, any of them will reach the maximum memory setting, no more write operations can be performed. (Note)
# Maxmemory <bytes>


############################# Append only mode ####### ########################


# Whether to record logs after each update operation. If not enabled, data may be lost for a period of time during power failure. Because redis synchronizes data files according to the save conditions above, some data will only exist in the memory for a period of time. The default value is no.
Appendonly yes


# Update the log file name. The default value is appendonly. aof (comment)
Appendfilename d:/redis/var/appendonly. aof
# If unsure, use "everysec ".
# Update log conditions. There are three optional values. "No" indicates that data is cached and synchronized to the disk by the operating system. "always" indicates that data is manually written to the disk by calling fsync () after each update operation. "everysec" indicates that data is synchronized once per second (default ).
Appendfsync always
# Appendfsync everysec
# Appendfsync no


############################### Virtual memory ###### #########################


# Whether to use virtual memory. The default value is no.


# Vm-enabled no
# Vm-enabled yes
# Virtual memory file path. The default value is/tmp/redis. swap. It cannot be shared by multiple Redis instances.
# Vm-swap-file d:/redis. swap


# Store all data greater than vm-max-memory into the virtual memory. No matter how small the vm-max-memory settings are, all the index data is stored in the memory (Redis's index data is keys ), that is to say, when vm-max-memory is set to 0, all values exist on the disk. The default value is 0.
# Vm-max-memory 0
# Vm-page-size 32
# Vm-pages 134217728


# You can set the number of threads used to access the swap file. It is recommended that the number of server cores not exceed the value. If it is set to 0, all operations on the swap file are serial. it may cause a long delay, but it guarantees data integrity.
# Vm-max-threads 0


############################## Advanced config ####### ########################


# Glueoutputbuf yes


# Hash-max-zipmap-entries 64
# Hash-max-zipmap-value 512
# Activerehashing yes


################################## Des ##### ##############################


# Include one or more other config files here. This is useful if you
# Have a standard template that goes to all redis server but also need
# To customize a few per-server settings. Include files can include
# Other files, so use this wisely.
#
# Include/path/to/local. conf
# Include/path/to/other. conf

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.