General System Design — the product classics
System design beyond the data-infra core — the product classics every generalist interview loop draws on: feeds and chat, proximity and maps, video, file sync, crawling, notifications and email, payments, a matching engine, and an audit-proof ledger. Start with the foundations on the data-infra ramp, then read these for breadth. Every stop an interactive, animated explainer.
- Design a News Feed — When someone opens the app, show a fresh ranked list from everyone they follow — the fan-out fork that every feed question turns on.
- Design a Chat System — Messages that arrive instantly, in order, and never vanish — even when the recipient is in a tunnel. A WebSocket fleet over a durable inbox.
- Design a Notification System — Fan one event out to push, SMS, and email at scale — per-channel workers, retries, rate caps, and the opt-out that must always hold.
- Design an Email Service — Accept, queue, and deliver mail reliably — separating submission from delivery, retrying a deferred recipient, and guarding deliverability.
- Build a Report and Fan It Out to Millions — Two systems wearing one prompt — a batch pipeline that computes twenty million personalized reports, and a delivery ramp that mails every one inside a window without double-sending.
- Design Search Autocomplete — Finish the query as they type, in a few milliseconds — the trie with top completions precomputed, and the keystroke firehose debounced.
- Design a Web Crawler — Fetch the web politely, without re-fetching the same page or drowning one host — the frontier, dedup at scale, and the spider trap.
- Design a Proximity Service — Given my location, return the nearby things fast — the spatial index, and the boundary case a naive grid misses.
- Design Google Maps — Render the world and route across it — tiling, a contraction hierarchy that precomputes shortcuts, and streaming only the tiles in view.
- Design a Video Platform — Upload a 4K clip and stream it to millions — where the CDN egress bill dwarfs storage, and transcoding is a DAG of parallel tasks.
- Design a File-Sync Service — Keep a folder identical across devices — content-hash the chunks so only what changed moves, and resolve a concurrent edit without losing a write.
- Buy the Cheapest Book — It sounds like a database query — the whole design hides in "cheapest" (a computed landed cost over prices you don't control) and "buy" (a promise the price must survive to checkout).
- Design a Payment System — Move money exactly once, never twice — idempotent charges, a ledger that holds the double-spend, and reconciliation against the processor.
- The Audit-Proof Ledger — Stop storing the balance and start storing the events — a deterministic replay that rebuilds byte-identical state and catches a tampered event on the spot.
- Design a Trading Dashboard — A million people watching prices move, fed by exchanges emitting millions of ticks a second — conflation, WebSocket fan-out, and the snapshot-then-delta protocol that keeps a screen honest.
- Design a Matching Engine — Match buy and sell orders fairly and fast — the price-time-priority order book, and why the hot loop is single-threaded per symbol.