OpsCanary
data infraredisPractitioner

Mastering High Availability with Redis Sentinel

5 min read Official DocsApr 28, 2026
Share
PractitionerHands-on experience recommended

High availability is critical in production environments, especially for data stores like Redis. Redis Sentinel provides a robust solution by monitoring your Redis instances and automatically handling failovers. This means that if your master instance goes down, Sentinel can promote a replica to master, reconfigure the other replicas, and notify your applications of the new master address. This minimizes downtime and keeps your services running smoothly.

At its core, Redis Sentinel operates as a distributed system with multiple Sentinel processes working together. It constantly checks the health of your master and replica instances. If a master is deemed unreachable, a quorum of Sentinels must agree before initiating a failover. Key configuration parameters include sentinel monitor, which tells Sentinel which master to monitor, and down-after-milliseconds, which defines how long an instance must be unreachable before being marked as down. You need at least three Sentinel instances for a robust deployment, as this ensures that a quorum can be reached for failover decisions.

In production, be aware of the limitations. Redis uses asynchronous replication, so acknowledged writes may not be retained during failures. Regularly test your setup in development or production to ensure it behaves as expected. Also, be cautious with Docker or network configurations that might interfere with Sentinel's ability to discover other processes. Remember, the current version of Sentinel is 2, and the older version is deprecated, so always use the latest stable release for the best features and support.

Key takeaways

  • Configure at least three Sentinel instances for reliable failover.
  • Set `down-after-milliseconds` to define how quickly Sentinel reacts to instance failures.
  • Use `sentinel monitor` to specify which master to track for high availability.
  • Regularly test your Sentinel setup to ensure it functions correctly during failures.
  • Be cautious with Docker and network configurations that can disrupt Sentinel's discovery process.

Why it matters

In production, downtime can lead to significant revenue loss and user dissatisfaction. Redis Sentinel helps maintain service continuity by automating failover processes, ensuring your applications remain available even during instance failures.

Code examples

Bash
redis-sentinel /path/to/sentinel.conf
Bash
sentinel monitor mymaster 127.0.0.1 6379 2
sentinel down-after-milliseconds mymaster 60000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1
Bash
SENTINEL CONFIG SET

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.