rounds
20 min
caching
queues
consistency

System Design: Scale, Cache, Consistency

When to shard, cache, queue, and what you sacrifice.

Covers: caching · queues · consistency

Tools with purpose - **Cache** — cut read latency; watch stampede, TTL, invalidation. - **Queue** — absorb spikes; enable async fanout; need idempotent consumers. - **Shard / partition** — hot keys kill you; choose a key that spreads load. - **Replica** — scale reads; accept lag or use read-your-writes tricks. - **Idempotency keys** — payments and webhooks.

Consistency menu Strong vs eventual — name the user-visible bug if you choose eventual (stale feed, double charge).

Practice Cache Stampede mission or Idempotent Charge coding problem — explain the failure mode first.

Crucible — Interview prep that ends in evidence