The Desi Architect
Notes / Design Interview Problems / Design Redis / Memcached (Distributed Cache)
Track 5 · Design Interview Problems

Design Redis / Memcached (Distributed Cache)

Designing an in-memory distributed cache from scratch. Consistent hashing, LRU eviction with O(1) ops, cache stampedes, and surviving node outages.

Interview problem25 min read1 interactive
On this page
  1. Problem framing
  2. Questions I ask before drawing anything
  3. Requirements
  4. Estimation
  5. API design
  6. In-memory storage engine: O(1) LRU eviction
  7. Evolutionary architecture: v1 MVP to v2 Distributed scale
  8. Cluster partitioning: Consistent Hashing with virtual nodes
  9. The three deadly cache failure modes
  10. Edge cases and failure recovery
  11. Cross-questions interviewers will ask
  12. Interview Rubric: Mid-Level vs Senior / Staff