From c1d10e8bb7c61d9c6f057aae0846722529dedb73 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 4 Feb 2015 12:21:54 +0100 Subject: [PATCH] No-sync: some info in the example redis.conf comments. --- redis.conf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/redis.conf b/redis.conf index 9e15769a..da7761d3 100644 --- a/redis.conf +++ b/redis.conf @@ -300,6 +300,38 @@ repl-diskless-sync-delay 5 # # repl-ping-slave-period 10 +# WARNING: This feature is experimental, just an evaluation draft. +# +# No-sync replication is a special, inconistent, mode of operation for slaves +# that is sometimes useful in caching scenarios. +# +# In this setup slaves, when connecting to masters, don't ask for the pre +# existing state of the key space, so no synchronization with the current +# master data is performed at all. However the slaves will get all the new +# stream of writes receiving the master, starting from the moment the slave +# connects. +# +# This means that: +# 1) There is no consistency between master and slaves operating in this mode. +# 2) It is possible that keys with an expire in the master will never expire +# in the slave (because the slave may miss the EXPIRE command). +# 3) Keys updated with non-idempotent commands may end with different values. +# +# However if your workload is about idempotent updates (for example using +# just the SET command), and no-sync slaves are configured in order to evict +# data on their own using maxmemory and a suitable policy, there are certain +# advantages: +# +# 1) Slaves are always available (assuming they are configured to serve stale +# data), since reconnecting with the master has no cost. +# 2) Masters don't have to persist on disk and/or stream an RDB file to the +# slaves, slaves are just accepted ASAP and put online. +# +# To enable, simply set repl-no-sync to yes. By default this feature is +# disabled. +# +# repl-no-sync no + # The following option sets the replication timeout for: # # 1) Bulk transfer I/O during SYNC, from the point of view of slave.