################################# GENERAL #####################################
# Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程方式。 # 注意配置成守护进程后Redis会将进程号写入文件/var/run/redis.pid daemonize no
# 如果你在 upstart or systemd 中运行redis,redis 提供你supervision tree功能; # 具体配置: # supervised no - no supervision interaction # supervised upstart - signal upstart by putting Redis into SIGSTOP mode # supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET # supervised auto - detect upstart or systemd method based on # UPSTART_JOB or NOTIFY_SOCKET environment variables # Note: these supervision methods only signal "process is ready." # They do not enable continuous liveness pings back to your supervisor. supervised no
# 如果master少于N个延时小于等于M秒的已连接slave,就可以停止接收写操作。 # N个slave需要是“oneline”状态 # 延时是以秒为单位,并且必须小于等于指定值,是从最后一个从slave接收到的ping(通常每秒发送)开始计数。 # 例如至少需要3个延时小于等于10秒的slave用下面的指令: # 两者之一设置为0将禁用这个功能。 # 默认 min-slaves-to-write 值是0(该功能禁用)并且 min-slaves-max-lag 值是10。 # # For example to require at least 3 slaves with a lag <= 10 seconds use: # # min-slaves-to-write 3 # min-slaves-max-lag 10 # # Setting one or the other to 0 disables the feature. # # By default min-slaves-to-write is set to 0 (feature disabled) and # min-slaves-max-lag is set to 10.
################################ REDIS CLUSTER ############################### # # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however # in order to mark it as "mature" we need to wait for a non trivial percentage # of users to deploy it in production. # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # 开启集群 # # cluster-enabled yes