How does Redis Cluster provide horizontal scaling?
Assesses fundamental understanding of Redis conventions, runtime behavior, and memory/performance considerations.
Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.
Redis Cluster shards data across nodes using 16384 hash slots. Each key maps to a slot via CRC16(key) mod 16384, and slots are assigned to masters. Clients may query any node; if the slot lives elsewhere the node replies with a MOVED redirection, and smart clients cache the slot map.
Each master has one or more replicas for failover. When a master fails, its replicas promote automatically once a majority of masters agree. Multi-key operations require all keys in the same slot, which hash tags can force: {user:42}:profile and {user:42}:sessions share a slot.
Limitations: only database 0 is available, some cross-key commands are unsupported, and the cluster needs at least three masters for a healthy quorum. Resharding moves slots between nodes online, enabling scaling without downtime.
Candidate Response Strategy & Interview Tips
- Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
- Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
- Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
- Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.