summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-08-27 12:34:29 +0200
committerantirez <antirez@gmail.com>2018-08-27 12:34:29 +0200
commit5941022b524bd8b7017af3811083ed42a85de000 (patch)
tree8eecd742eabe7dc14d7108d3361bd08f92714144
parente245a2046af680a18f74cb76c2a23f5711149501 (diff)
downloadredis-5941022b524bd8b7017af3811083ed42a85de000.tar.gz
Document slave-ignore-maxmemory in redis.conf.
-rw-r--r--redis.conf20
1 files changed, 20 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf
index 5cbc74bbd..886c64f21 100644
--- a/redis.conf
+++ b/redis.conf
@@ -602,6 +602,26 @@ slave-priority 100
#
# maxmemory-samples 5
+# Starting from Redis 5, by default a slave will ignore its maxmemory setting
+# (unless it is promoted to master after a failover or manually). It means
+# that the eviction of keys will be just handled by the master, sending the
+# DEL commands to the slave as keys evict in the master side.
+#
+# This behavior ensures that masters and slaves stay consistent, and is usually
+# what you want, however if your slave is writable, or you want the slave to have
+# a different memory setting, and you are sure all the writes performed to the
+# slave are idempotent, then you may change this default (but be sure to understand
+# what you are doing).
+#
+# Note that since the slave by default does not evict, it may end using more
+# memory than the one set via maxmemory (there are certain buffers that may
+# be larger on the slave, or data structures may sometimes take more memory and so
+# forth). So make sure you monitor your slaves and make sure they have enough
+# memory to never hit a real out-of-memory condition before the master hits
+# the configured maxmemory setting.
+#
+# slave-ingore-maxmemory yes
+
############################# LAZY FREEING ####################################
# Redis has two primitives to delete keys. One is called DEL and is a blocking