diff options
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/redis.conf b/redis.conf index 92718346e..f9f569121 100644 --- a/redis.conf +++ b/redis.conf @@ -318,8 +318,34 @@ repl-diskless-sync no # it entirely just set it to 0 seconds and the transfer will start ASAP. repl-diskless-sync-delay 5 -# Enable diskless replication on slave side. -# Load RDB directly from the socket rather than saving it to disk first. +# Enable diskless replication on slave side. +# +# When this option is on, the slave loads the RDB directly from the socket +# rather than saving it to disk first. However there are data loss risks +# associated with this feature, so make sure to read the following WARNING +# section. +# +# WARNING: Note that this means that the dataset in the slave gets flushed +# before the slave is actually sure the RDB transfer is complete, so if the +# replication link is disconnected after the slave already flushed away its +# dataset, but before successfully loading the new one, the slave will +# remain empty (for all the time needed to attempt a new synchornization with +# the master). +# +# This means that you should carefully consider the effects of this feature +# on slaves that may be promoted to masters: +# +# 1) Sentinel checks the disconnection time and the offset of slaves before +# promotion. However it is possible that after the check, the slave +# attempts to connect with the master again and flushes its dataset. +# In order to run Sentinel safely in this setup, make sure to enable +# the "slave-protected-restart" option. +# +# 2) Redis Cluster slaves will refuse to try to be promoted to masters if +# if the dataset was flushed, so this is safe in the context of Redis Cluster. +# +# 3) If you are using your own HA setup, make sure to enable slave +# "slave-protected-restart". repl-diskless-load no # Slaves send PINGs to server in a predefined interval. It's possible to change |