Databases 11 min read

Designing a High‑Availability Redis Service with Sentinel

This article explains how to build a highly available Redis service using Redis Sentinel, discusses common failure scenarios, compares several architectural options from a single instance to a three‑node Sentinel setup, and provides practical tips such as using virtual IPs for seamless client access.

IT Architects Alliance
IT Architects Alliance
IT Architects Alliance
Designing a High‑Availability Redis Service with Sentinel

Redis is a widely used in‑memory key‑value store for sessions, caching, simple queues, and pub/sub, but a single Redis instance suffers from single‑point‑of‑failure risks, prompting the need for high‑availability solutions.

The author defines high availability as the ability of the service to continue operating or recover quickly after various failures, enumerating three typical anomalies: a Redis process crash on a node, an entire node failure, and network partition between nodes.

Several HA designs are evaluated:

Option 1 – Single Redis server without Sentinel: simple but vulnerable to any node or process failure.

Option 2 – Master‑slave replication with a single Sentinel instance: adds failover capability but the Sentinel itself becomes a single point of failure.

Option 3 – Master‑slave replication with two Sentinel instances: improves Sentinel redundancy but still cannot guarantee failover when a whole node goes down because a majority of Sentinels is required for election.

Option 4 – Master‑slave replication with three Sentinel instances on three machines: the chosen solution; it tolerates single‑process, single‑machine, or two‑machine network failures, ensuring continuous service.

The article also suggests optionally adding a third Redis server (one master, two slaves) for extra data redundancy, and discusses using virtual IP (VIP) to present a single address to clients, automatically moving the VIP during master promotion.

Finally, the author notes that while building a basic service is easy, achieving high availability adds complexity, requiring additional servers, multiple Sentinel processes, and supervision tools like Supervisor to monitor and restart processes.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

architecturedatabasesentinelfailoverhigh-availability
IT Architects Alliance
Written by

IT Architects Alliance

Discussion and exchange on system, internet, large‑scale distributed, high‑availability, and high‑performance architectures, as well as big data, machine learning, AI, and architecture adjustments with internet technologies. Includes real‑world large‑scale architecture case studies. Open to architects who have ideas and enjoy sharing.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.