Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Distributed Cache System Design
Visual Problem Diagram

Scenario
Flash sale starts and one product id owns a Redis shard—CPU looks fine while the database melts. The interview is consistent hashing, eviction, replication lag, and cache-aside invalidation, not memorizing RDB flags.
Design a distributed caching system like Redis or Memcached that stores key-value data across many nodes with replication and eviction. Production pain is hot keys, invalidation, and wrong consistency assumptions—not drawing one cache box.
You should support get/set/TTL, atomic ops, horizontal scale, and failure recovery. Be ready to explain consistent hashing, cache-aside, eviction, and replication lag tradeoffs.
Constraints
get/set/delete, TTL, eviction when full, atomic increment, optional persistence snapshot
< 1 ms p99 hot get, 99.9% availability, partition tolerant, horizontal scale-out
10M ops/s aggregate, 100 GB+ per cluster, 100M keys, skewed access patterns
Stages ahead
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.