Detailed description of the Redis configuration file redis.conf

Source: Internet
Author: User
Tags redis syslog
# Redis configuration file

# When you need to configure the memory size in the configuration, you can use similar formats such as 1k, 5GB, 4M, which are converted as follows (case-insensitive)
#
# 1k =>
1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1MB =>
1024*1024 bytes
# 1g => 1000000000 bytes
# 1GB => 1024*1024*1024
bytes
#
# memory configuration case is the same. For example 1GB 1Gb 1GB 1gB

# Daemonize No by default, Redis does not run in the background, and if you need to run in the background, change the value of the item to Yes
Daemonize
Yes

# when Redis is running in the background, Redis the default will put the PID file in/var/run/redis.pid, you can configure to other addresses.
#
When running multiple Redis services, you need to specify different PID files and ports
Pidfile/var/run/redis.pid

# Specifies the port on which Redis is running, by default 6379
Port 6379

# Specifies that Redis only receive requests from this IP address, and if not set, all requests will be processed.
# It is best to set this item in a production environment
# bind
127.0.0.1

# Specify the path for the UNIX socket, that'll be used to listen for
#
Incoming connections. There is no default, so Redis would not listen
# on a
The UNIX socket is not specified.
#
# Unixsocket/tmp/redis.sock
#
Unixsocketperm 755

# Sets the timeout in seconds for client connections. When the client does not issue any instructions during this time, close the connection
# 0 is to turn off this setting
Timeout
0

# Specify Logging Level
# Redis supports a total of four levels: Debug, verbose, notice, warning, default to verbose
#
Debug records a lot of information for development and testing
# Varbose Useful information, unlike debug will record so much
#
Notice common verbose, often used in production environments
# warning only very important or serious information will be logged to the log
LogLevel
Debug

# Configure log file address
# The default value is stdout, standard output, if the background mode will be output to/dev/null
#logfile
StdOut
Logfile/var/log/redis/redis.log

# To enable logging to the system logger, just set ' syslog-enabled ' to
Yes
# and optionally update the other syslog parameters to suit your
Needs.
# syslog-enabled No

# Specify the syslog identity.
# syslog-ident Redis

# Specify the syslog facility. Must be USER or between local0-local7.
#
Syslog-facility local0

# Number of available databases
# The default value is 16, the default database is 0, and the database ranges between 0-(database-1)
Databases 16

################################ Snapshots
#################################
#
# Save data to disk in the following format:
#
# Save
<seconds> <changes>
#
#
Indicates how many update operations have been done over a long period of time, synchronizing the data to the data file RDB.
# The equivalent of a conditional trigger grab snapshot, which can be combined with multiple conditions
#
#
For example, the settings in the default configuration file set three criteria
#
# Save 900 1 900 seconds at least 1 keys have been changed
# Save 300
At least 300 keys have been changed in 10 300 seconds.
# Save 60 10000 60 seconds at least 10,000 keys have been changed
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.