Redis

Sentinel and Cluster Interview Questions

How would you design Redis for high availability? — spoken sample answer for Indian interviews.

  • 5Questions with answers
  • 3Difficulty levels

Questions (5)

Browse beginner, intermediate, and advanced questions with answers — hide them when you want to self-test.

Question 1
Interview Advanced
Question

How would you design Redis for high availability?

Answer:

A single Redis process is not HA. I would use Sentinel for primary plus replicas and automatic failover when the dataset fits on one primary. Clients discover the new primary through Sentinel. If I need to shard, I use Redis Cluster: 16384 hash slots, more than one primary, a replica per primary. I would talk about replica lag, Sentinel quorum so I do not split-brain, and actually testing failover, not only drawing it. If Redis is only a cache and the DB is source of truth, a short failover miss is acceptable. If Redis holds locks or sessions I cannot drop, I treat HA as mandatory.

Question 2
Interview Intermediate
Question

Sentinel versus Cluster?

Answer:

Sentinel: failover for master-replica. Cluster: sharding plus failover. I would not Cluster a tiny dataset only for HA. Sentinel is simpler. Cluster when I need shards.

Question 3
Interview Advanced
Question

What must the client do in Sentinel failover?

Answer:

Discover the new master — Sentinel-aware client or proxy. A pinned IP writes to a dead master. Test failover. Clients are half the design.

Question 4
Interview Intermediate
Question

Hash slots and cross-slot keys?

Answer:

16384 slots. Multi-key commands need the same slot. Hash tags {user}:a keep related keys together. First Cluster gotcha.

Question 5
Interview Advanced
Question

Upgrade without a long outage?

Answer:

Roll replicas, failover to an upgraded replica, then upgrade the old master. Check replication offset. Practice in staging. Upgrades are HA interviews in disguise.

Practice with AI mock interviews

Run Redis mock interviews with AI follow-ups, instant feedback, and analytics on AiLx.

Free to start · No credit card required