HLD prep is optimised for larger screens
Open on a laptop or desktop (1024px+) for the diagram canvas and the section sidebar side-by-side.
Problem Understanding
Restate the problem in your own words.
Design a Distributed Cache
Design a distributed in-memory cache (Memcached- or Redis-Cluster-class) that fronts the primary database: thousands of nodes, billions of keys, sub-millisecond reads, consistent-hash sharding, and replication for HA. Reads are 10× writes by design — that’s why we cache. The interesting decisions are the eviction policy (LRU vs. LFU vs. ARC), write-through vs. cache-aside, and how to handle cache stampedes, hot keys, and node failure without breaking the application’s invariants.
- Redis Cluster16384 hash slots across N shards, with replication. Used by Twitter, GitHub, and most Fortune 500 stacks.
- Memcached at FacebookThousands of mcrouter-fronted Memcached nodes; the original lookaside cache pattern at hyperscale.
- AWS ElastiCacheManaged Redis / Memcached. Same internals, abstracts the cluster ops away.
- DynamoDB DAXDatabase-native cache with read-through; eliminates the cache-aside double-write surface.
Your task: read the problem above, then write what the system is, who uses it, the rough scale, and the headline UX expectation — in your own words. Submit for AI review when you're ready.
Click any step in the sidebar to jump around — sections don't have to be done in order. Press ? any time to see all shortcuts.