Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Distributed Cache System Design

Visual Problem Diagram

Distributed Cache System Design architecture 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

Functional

get/set/delete, TTL, eviction when full, atomic increment, optional persistence snapshot

Non-functional

< 1 ms p99 hot get, 99.9% availability, partition tolerant, horizontal scale-out

Scale

10M ops/s aggregate, 100 GB+ per cluster, 100M keys, skewed access patterns

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.