summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
Diffstat (limited to '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