Skip to main content
Version: Develop

Redis® Sentinel

HA Cluster with Redis® Sentinel

a9s Redis®* uses Redis® Sentinel to provide a high available replication set. Redis® Sentinel is monitoring several nodes, takes care of the automatic failover and is able to send notifications when something in the cluster is changing.

a9s Redis provides some settings to adjust the cluster behavior. min-slaves-max-lag, down-after-milliseconds, and failover-timeout.

SettingEffect
min-slaves-max-lagRedis® < 6: Time in seconds how long the master waits before he stops accepting write operations, when slaves are no more reachable. Default is 10 seconds. min-slaves-to-write can not be changed, it is fixed set to 1.
See redis.conf
min_replicas_max_lagRedis® >= 6: Time in seconds how long the master waits before he stops accepting write operations, when replicas are no more reachable. Default is 10 seconds. min-replicas-to-write can not be changed, it is fixed set to 1.
See redis.conf
down-after-millisecondsNumber of milliseconds the master is unreachable in order to mark it a S_DOWN state. Default is 10000 ms.
See sentinel.conf
failover-timeoutThe failover timeout value in milliseconds. Default is 30000 ms.
See sentinel.conf
# a9s Redis® < 6
cf update-service my-redis-service -c {"min-slaves-max-lag": "10"}

# a9s Redis® >= 6
cf update-service my-redis-service -c {"min_replicas_max_lag": "10"}
cf update-service my-redis-service -c '{"down-after-milliseconds": "10000"}'
cf update-service my-redis-service -c '{"failover-timeout": "30000"}'

*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by anynines GmbH is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and anynines GmbH.