All Templates / Storage

Redis HA Cluster with Sentinel

Redis HA Cluster with Sentinel

Deploy a Redis HA Cluster with Sentinel for automated failover.

Deploy Redis HA Cluster with Sentinel

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.

diagram

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.


Deploy Now

Details

Railway Templates

Created on Aug 8, 2024

18 total projects

2 active projects

100% success on recent deploys

Storage



More templates in this category

View Template
ReadySet

ReadySet

A lightweight caching engine for Postgres


Milo

View Template
EdgeDB

EdgeDB

EdgeDB template based on their Docker deployment guide


Ajit Krishna

View Template
Apache Kvrocks

Apache Kvrocks

A drop-in replacement for Redis to store data on a volume.


Bram