Skip to main content

System Design Playbook

Most system design write-ups spend 80% of their words on the easy 80% of the problem: put a load balancer in front, shard the database, add a cache, done. Interviews are not lost there. They are lost on the remaining 20% — the seat that gets sold twice, the celebrity whose post fans out to 150M inboxes, the GPS trace that snaps to the wrong highway, the click that gets billed twice.

This site takes 31 classic problems and, for each one, goes straight at that 20%.

What each page contains​

SectionWhat you get
Problem framingA sharpened prompt, functional and non-functional requirements, and back-of-the-envelope numbers that justify every later decision.
High-level architectureOne diagram you could redraw on a whiteboard in 90 seconds.
Component inventoryA table of every box in the diagram: what it is, the concrete technology, and why that one rather than the obvious alternative.
Data model & APIThe two or three tables and endpoints that carry the design.
The toughest parts5–7 genuinely hard sub-problems. Each gets why it is hard, the solution, and usually a code sketch or a second diagram.
Failure modesWhat breaks first under load, and what you say when the interviewer asks "what if that goes down?"
Cheat sheetThe 60-second version, for when you have already spent 40 minutes on the deep dive.

The code in this playbook​

The snippets are illustrative, not production. They are deliberately short — enough to prove you know what the implementation actually looks like (the Lua script, the Kafka transaction, the bitboard check) without turning the page into a repository. Error handling, metrics, and configuration are omitted throughout. If a snippet is 15 lines, that is because 15 lines is what it takes to make the mechanism unambiguous.

How to use it​

  1. Read the framing and draw the diagram from memory. If you cannot reproduce the boxes, you do not own the design yet.
  2. Pick two toughest parts per problem and go deep. Interviewers reward depth on two things far more than breadth on eight.
  3. Follow the cross-links. The same six or seven ideas — consistent hashing, idempotency keys, hybrid fan-out, probabilistic counting, actor-per-entity, log-then-aggregate — solve most of these problems. The pattern index maps them.

Where to start​