diff options
author | antirez <antirez@gmail.com> | 2016-07-27 16:41:20 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-07-27 17:32:15 +0200 |
commit | 55385f99debddb23da8a8045273c88b50be24c0f (patch) | |
tree | 755bde50f762627d205a314a6d75a94e119feb8b /redis.conf | |
parent | 356a6304ec77783e7fdaf00668a09dc293b810a0 (diff) | |
download | redis-55385f99debddb23da8a8045273c88b50be24c0f.tar.gz |
Ability of slave to announce arbitrary ip/port to master.
This feature is useful, especially in deployments using Sentinel in
order to setup Redis HA, where the slave is executed with NAT or port
forwarding, so that the auto-detected port/ip addresses, as listed in
the "INFO replication" output of the master, or as provided by the
"ROLE" command, don't match the real addresses at which the slave is
reachable for connections.
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf index 05158b4e7..b9217fdb4 100644 --- a/redis.conf +++ b/redis.conf @@ -443,6 +443,35 @@ slave-priority 100 # By default min-slaves-to-write is set to 0 (feature disabled) and # min-slaves-max-lag is set to 10. +# A Redis master is able to list the address and port of the attached +# slaves in different ways. For example the "INFO replication" section +# offers this information, which is used, among other tools, by +# Redis Sentinel in order to discover slave instances. +# Another place where this info is available is in the output of the +# "ROLE" command of a masteer. +# +# The listed IP and address normally reported by a slave is obtained +# in the following way: +# +# IP: The address is auto detected by checking the peer address +# of the socket used by the slave to connect with the master. +# +# Port: The port is communicated by the slave during the replication +# handshake, and is normally the port that the slave is using to +# list for connections. +# +# However when port forwarding or Network Address Translation (NAT) is +# used, the slave may be actually reachable via different IP and port +# pairs. The following two options can be used by a slave in order to +# report to its master a specific set of IP and port, so that both INFO +# and ROLE will report those values. +# +# There is no need to use both the options if you need to override just +# the port or the IP address. +# +# slave-announce-ip 5.5.5.5 +# slave-announce-port 1234 + ################################## SECURITY ################################### # Require clients to issue AUTH <PASSWORD> before processing any other |