Redis HA Cluster with Sentinel
Deploy a Redis HA Cluster with Sentinel for automated failover.
redis-2
bitnami/redis:7.2.5
Just deployed
/bitnami
redis-1
bitnami/redis:7.2.5
Just deployed
/bitnami
sentinel-1
bitnami/redis-sentinel:7.4
Just deployed
sentinel-0
bitnami/redis-sentinel:7.4
Just deployed
redis-0
bitnami/redis:7.2.5
Just deployed
/bitnami
sentinel-2
bitnami/redis-sentinel:7.4
Just deployed
This template deploys a Redis replica set and set of Redis Sentinel services from the bitnami/redis and bitnami/redis-sentinel images, respectively.
It is designed based on the recommendations provided in the Redis documentation.
Configuration Tuning
The following environment variables are set in the Sentinel services:
REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=60000
REDIS_SENTINEL_FAILOVER_TIMEOUT=180000
REDIS_SENTINEL_QUORUM=2
Refer to the bitnami docs for a full list of configuration options:
If you prefer to have more control over the deployment, we previously built an implementation using Dockerfiles which is still available here.
Inter-node communication
All services utilize the private network to communicate with each other.
Deployment regions
The nodes can be moved to different regions, and it is generally recommended, for fault tolerance in the case of a regional issue, but be sure to deploy the redis/sentinel pairs in the same region.
Connecting to the cluster
You should connect to the cluster through the Sentinel services. The configuration method will depend on your client. You can find an example of a node server using ioredis to connect here
Documentation
Please refer to the Redis documentation for more information about how these services work, and how to customize them.
Template Content
redis-2
bitnami/redis:7.2.5redis-1
bitnami/redis:7.2.5sentinel-1
bitnami/redis-sentinel:7.4sentinel-0
bitnami/redis-sentinel:7.4redis-0
bitnami/redis:7.2.5sentinel-2
bitnami/redis-sentinel:7.4