The index · 81 systems

Pick a system. Defend every decision.

Don't skip to the diagram — that's the trap that makes designs collapse at scale. Start with clarifications, defend each choice against an AI staff engineer, then watch the simulator execute the diagram you land on.

81problems
50ready to solve
49design products
32build infra

Compose products from existing primitives — the classic interview loop: clarifications, requirements, capacity, API, data model, HLD, deep dives, trade-offs.

Topics

Broad systems

architecture & decomposition
#01Ready

URL Shortener

Shorten a long URL. Read-heavy. Don't collide.

Beginner~25 min9 stages
base62id generationread-heavy caching+1
Foundations
#02Ready

Pastebin

Store text/code blobs with TTL and access control.

Beginner~45 min9 stages
object store + metadata DB splitedge cache key design (Vary, Cache-Control: private)TTL: lazy on-read + active sweeper + S3 lifecycle+4
Foundations
#06Ready

Web Crawler

Politely traverse the web at scale. Don't crawl yourself in circles.

Advanced~45 min9 stages
Mercator back-queue schedulingper-host / per-IP / per-AS politenessBloom-filter + RocksDB seen-set+7
Search & Indexing
#07Ready

Twitter / X Timeline

Push or pull? Both. The canonical fanout problem.

Intermediate~45 min9 stages
fanout-on-writefanout-on-readcelebrity problem+1
Feed & Timeline
#08Ready

Instagram News Feed

Ranked feed with cursor pagination. No `OFFSET`.

Intermediate~45 min9 stages
rankingtwo-stage retrievalcursor pagination+3
Feed & Timeline
#09Ready

Reddit / Hacker News

Vote-driven ranking with hot/top/new at scale.

Intermediate~45 min9 stages
vote-driven rankingprecomputed listingscomment-tree precompute+4
Feed & Timeline
#11Ready

WhatsApp / Messenger

Hundreds of millions of long-lived sockets, sub-second 1:1 + group delivery, E2E-encrypted, multi-device, multi-region active-active.

Advanced~50 min9 stages
long-lived TLS socketsfanout-on-write vs readoutbox pattern+7
Real-time messaging
#12Ready

Collaborative Editor (Google Docs)

OT vs CRDT. Causal ordering. Real conflict-freedom. Server-authoritative single-writer doc-actor with WAL-before-ack — per-doc serialization, persisted before broadcast, pinned to a home region.

Advanced~60 min9 stages
single-writer doc-actor (Figma model)OT vs CRDT vs server-authoritative hybridcausal ordering / monotonic op IDs+9
Real-time collaboration
#12Ready

Slack / Discord

Channels, presence, history. Push or pull — and how a hot-channel fanout doesn't melt the gateway.

Intermediate~50 min9 stages
long-lived WebSocket gatewaychannel server (consistent-hash by channel_id)mega-channel relay tier (Discord Maxjourney)+7
Real-time messaging
#13Ready

Notification System

Push, email, SMS. Idempotent. Failover.

Intermediate~60 min9 stages
end-to-end idempotencyper-channel bulkheadingactive-region fencing tokens+4
Real-time messaging
#14Ready

Live Comments / Score Updates

Pub/sub at scale. WebSocket vs SSE vs long polling. Approximate by design — mega-rooms drop comments on purpose.

Intermediate~55 min9 stages
pub/sub fanoutwebsocket vs sse vs long-pollapproximate-by-design sampling+7
Real-time messaging
#15Ready

Uber / Lyft — Match Drivers and Riders

Match a rider to the closest acceptable driver in under 3 s. Geohash, S2, surge.

Advanced~60 min9 stages
H3 hexagonal hierarchical indexkRing candidate searchgeo-sharded dispatch (RingPop / DISCO)+5
Geospatial
#17Preview

Google Maps / Routing

Tiles, road graphs, contraction hierarchies, ETA.

Advanced~45 min9 stages
map tilesroad graphscontraction hierarchies+1
Geospatial
#18Ready

Dropbox / Google Drive

Chunking, dedup, sync, conflict resolution.

Advanced~55 min9 stages
content-defined chunkingcontent-addressed dedupfilesystem journal + cursors+2
Storage & Files
#19Ready

YouTube / Netflix Streaming

ABR, CDN, transcoding, hot/cold — the egress, fan-out, and popularity Pareto.

Advanced~60 min9 stages
ABR (HLS / DASH / CMAF)multi-tier CDNper-title / per-shot encoding+3
Storage & Files
#21Ready

Ad Click Aggregator

Stream processing with watermarks and exactly-once.

Advanced~45 min9 stages
stream processingexactly-oncewatermarks+1
Streaming & Analytics
#24Preview

Recommendation System

Candidate generation + ranking. Online + batch.

Advanced~45 min9 stages
candidate generationrankingembeddings+1
Streaming & Analytics
#25Ready

Payment / Wallet System

Idempotent, double-entry, sagas vs 2PC.

Advanced~45 min9 stages
idempotencydouble-entrysagas+3
Concurrency & Consistency
#26Ready

Ticketmaster / Hotel Booking

Don't oversell. Hold-then-confirm.

Intermediate~55 min9 stages
inventory lockinghold-then-confirmvirtual waiting room+4
Concurrency & Consistency
#27Ready

Stock Exchange / Order Matching

Single-writer matching. Microsecond budgets.

Advanced~45 min9 stages
single-writer principledeterministic state machineAeron Cluster / Raft sequencer+11
Concurrency & Consistency
#29Preview

Distributed Job Scheduler

Cron at scale: leader, exactly-once, DAGs.

Intermediate~45 min9 stages
leader electionexactly-onceDAGs
Coordination
#56Ready

AI Agent Platform

Long-running multi-step LLM agents — durable workflow + sandboxed execution + LLM gateway. Brain / hands / state are independently replaceable. The agent run is a workflow, not a request.

Advanced~45 min9 stages
durable execution (Temporal-style event-sourced workflow)brain / hands / state separationFirecracker microVM sandboxing+12
AI & Agentic Systems

Focused features

small surface, deep mechanics
#03Ready

Distributed Unique ID Generator

Generate globally unique, monotonic-ish IDs at scale.

Intermediate~45 min9 stages
Snowflake bit budget (timestamp / worker / sequence)UUIDv7 (RFC 9562) — index-locality vs randomnessworker-id leasing via ZooKeeper / etcd ephemeral nodes+7
Foundations
#04Preview

Rate Limiter

Cap request rates per user/key across a fleet.

Intermediate~30 min9 stages
token bucketsliding windowRedis Lua+1
Foundations
#16Preview

Yelp / Nearby Places

Search by location with relevance ranking.

Intermediate~45 min9 stages
geo searchrelevance
Geospatial
#31Ready

Concurrent Hotel Viewers

"X users viewing this right now." Hot keys, HLL.

Intermediate~45 min9 stages
presenceTTLhot keys+6
Ephemeral state & Live counters
#32Ready

Online Indicator

Green dot for contacts. Mind the N² watch problem. Approximate by design — never quote presence more precisely than reality.

Intermediate~45 min9 stages
viewport-bounded subscription (the N² solver)lazy fanout vs eager broadcastheartbeat TTL economics (set EX > heartbeat × 2 + jitter)+6
Ephemeral state & Live counters
#33Preview

Typing Indicators

High write rate, ephemeral, do not persist.

Beginner~45 min9 stages
debouncingephemerality
Ephemeral state & Live counters
#34Preview

Active-on-Document Avatars

Cursor + presence broadcast. Awareness protocols.

Intermediate~45 min9 stages
presencecursor broadcastawareness
Ephemeral state & Live counters
#35Ready

Live Viewer Count (YouTube/Twitch)

Millions of viewers on one entity. Approximate by design.

Advanced~75 min9 stages
sampled heartbeats vs explicit presenceHyperLogLog (p=14, ±0.81%) and PFMERGE across regionstwo-stage aggregation against hot streams+7
Ephemeral state & Live counters
#36Ready

Like Button at Scale

Eventual consistency, but the liker sees their own write. Counts are approximate by design; hot keys are the real enemy.

Intermediate~45 min9 stages
counter shardinghot key absorptionoutbox + event-sourced fanout+4
Counters & Likes
#37Ready

View Count on a Video/Post

Dedup, bot-filter, batched aggregation.

Intermediate~45 min9 stages
fire-and-forget event logidempotent counter rollupHyperLogLog uniques+4
Counters & Likes
#38Ready

Trending Topics

Sliding windows + Count-Min Sketch + top-K.

Advanced~75 min9 stages
multi-resolution sliding windowsCount-Min Sketch (Cormode-Muthukrishnan)HeavyKeeper / Space-Saving top-K+6
Counters & Likes
#39Preview

Read Receipts

Per-message per-recipient. Group chat amplifies.

Intermediate~45 min9 stages
per-recipient statefanoutamplification
Counters & Likes
#40Ready

Live Sports Scores to Millions

Goal scored → 30M phones updated in <2s. Pub/sub fanout, edge delivery, thundering herd.

Intermediate~55 min9 stages
pub/sub fanoutedge websocket terminationfan-out tree+6
Real-time delivery
#41Preview

Stock Ticker / Price Feed

Conflate stale, prioritize, ordered, backpressure.

Intermediate~45 min9 stages
conflationprioritybackpressure
Real-time delivery
#42Preview

Live Auction Bidding

Order, fairness, anti-sniping, optimistic UI.

Intermediate~45 min9 stages
orderingfairnessanti-sniping
Real-time delivery
#43Preview

Push Notification Fanout (1 → 100M)

APNs/FCM rate limits, dedup, DND.

Advanced~45 min9 stages
fanout pipelinevendor limitsDND
Real-time delivery
#44Preview

Submit Order (Prevent Double-Charge)

Idempotency keys, dedup window, retry storms.

Intermediate~45 min9 stages
idempotency keysdedup windowretry storms
Idempotency & Dedup
#46Preview

Webhook Delivery

At-least-once, backoff, poison pills, signing.

Intermediate~45 min9 stages
at-least-onceexponential backoffsigning
Idempotency & Dedup
#47Ready

Distributed Cron — Mass Scheduled Email

Single trigger, 50M recipient idempotency, catch-up.

Advanced~75 min9 stages
Borgcron-style at-least-once schedulerper-recipient idempotency at fan-out tailoutbox (durable trigger log + publish)+7
Idempotency & Dedup
#48Preview

Autocomplete / Typeahead

Trie/FST, prefix sharding, personalization.

Intermediate~35 min9 stages
trieFSTpersonalization
Search-as-you-type
#49Preview

Did You Mean / Spell Correction

Edit distance at scale + LMs + query log mining.

Intermediate~45 min9 stages
edit distancelanguage modelsquery log
Search-as-you-type
#50Preview

Recent Searches / People Also Searched

Per-user storage + privacy + cold start.

Intermediate~45 min9 stages
per-user storageprivacycold start
Search-as-you-type
#51Preview

Cache Stampede / Thundering Herd

Coalesce, probabilistic early expiration, SWR.

Intermediate~45 min9 stages
request coalescingPERstale-while-revalidate
Caching corner cases
#52Ready

Cache Invalidation Across a Fleet

Write-through vs write-behind. Two generals.

Advanced~45 min9 stages
write-throughwrite-behindpub/sub invalidation+4
Caching corner cases
#53Preview

Negative Caching

Cache misses for things that never existed.

Intermediate~45 min9 stages
negative cacheBloom filters as cache front
Caching corner cases
#54Ready

Distributed Lock

Redlock controversy, fencing tokens, lease vs lock.

Advanced~45 min9 stages
fencing tokenslease vs lockRedlock
Coordination at small scope
#55Preview

Leader Election for a Singleton Job

ZK/etcd primitives, split-brain, lease renewal.

Advanced~45 min9 stages
leader electionsplit-brainlease renewal
Coordination at small scope