diff options
author | Jérôme Loyet <822436+fatpat@users.noreply.github.com> | 2021-03-30 22:40:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 23:40:22 +0300 |
commit | 91f4f41665c4e9e0ad248ce0b528644de28d0acd (patch) | |
tree | e082ff732cd2f79316465a028f3b597dbf882018 /redis.conf | |
parent | 6a052af890ff325f0fbb749de92a73fdf7eec00d (diff) | |
download | redis-91f4f41665c4e9e0ad248ce0b528644de28d0acd.tar.gz |
Add replica-announced config option (#8653)
The 'sentinel replicas <master>' command will ignore replicas with
`replica-announced` set to no.
The goal of disabling the config setting replica-announced is to allow ghost
replicas. The replica is in the cluster, synchronize with its master, can be
promoted to master and is not exposed to sentinel clients. This way, it is
acting as a live backup or living ghost.
In addition, to prevent the replica to be promoted as master, set
replica-priority to 0.
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf index a78d958c3..2663cfce6 100644 --- a/redis.conf +++ b/redis.conf @@ -667,6 +667,18 @@ repl-disable-tcp-nodelay no # By default the priority is 100. replica-priority 100 +# ----------------------------------------------------------------------------- +# By default, Redis Sentinel includes all replicas in its reports. A replica +# can be excluded from Redis Sentinel's announcements. An unannounced replica +# will be ignored by the 'sentinel replicas <master>' command and won't be +# exposed to Redis Sentinel's clients. +# +# This option does not change the behavior of replica-priority. Even with +# replica-announced set to 'no', the replica can be promoted to master. To +# prevent this behavior, set replica-priority to 0. +# +# replica-announced yes + # It is possible for a master to stop accepting writes if there are less than # N replicas connected, having a lag less or equal than M seconds. # |