System Design
179 boards, 46 lessons, 631 review questions and 103 narrated videos, in 24 chapters. Read them in order. Each chapter builds on the one before.
Start here → The chai stall that got famous (load balancing)
Contents
Part one · Foundations
1The stall gets famous5 lessons
One chai stall, and everything that breaks as it gets famous: more stalls, a slate by the stove, a rail of order slips, copy clerks, and a ledger cut in two.
2When the stalls must agree5 lessons
Two books that should say the same thing and a wire that gets cut: CAP, who holds the pen, one transfer across two ledgers, the double charge, and the log everyone reads.
3Holding up under load4 lessons
What one wala does while the chai brews, then rate limits, turning people away on purpose, and the arithmetic of the nines when thirty servers answer one request.
4The parts, properly9 lessons
The pieces again at real depth: the map of all five, then choosing a database and guarding the last item, caching and the branch near your house, counting a crowd, the contract an API makes, keeping a line open, and a lock on every door.
- 01Why Data Is the Hard Part (the five building blocks)8 Q
- 02The Right Book for the Job (databases, deeply)9 Q
- 03The last vada (inventory contention and locking)8 Q
- 04The Slate, Properly (caching to real depth)9 Q
- 05The branch near your house (CDNs and object storage)7 Q
- 06Counting the crowd without a register (HyperLogLog, count-min, top-k)7 Q
- 07The Contract at the Counter (API design)10 Q
- 08The customer who won't hang up (polling, SSE and WebSockets)8 Q
- 09A lock on every door of the stall (security inside a design)8 Q
Part two · Build
5The interview, assembled2 lessons
The six steps every design question runs through, then four whole systems designed end to end in one night.
6The stall, built3 lessons
The spine as running Go: a gate, a slate and a rail, then copies and shards with a stale read on purpose, then a load generator that finds the knee.
Part three · Depth
7Amazon1 lesson
From a memo that became a one-click cart, through blast radius and eleven-nines reliability, to the typo that took down half the internet.
8Claude1 lesson
The request path through an orchestrator and context window, RAG and the agent loop, the inference fleet, and the training and eval pipeline behind it.
9Cloudflare1 lesson
One IP serving 330 cities, isolates instead of containers, an unpatchable Spectre, and 434 years of TLS handshakes saved by session resumption.
10Discord1 lesson
The gateway that holds millions of sockets open, the message-store rewrite, voice and video, and fan-out at the limit of a single channel.
11Dropbox1 lesson
Why sync is not copying - three trees and a merge base, the rewrite that worked, a fuzzer that found what code review didn't, and disks that lie.
12Figma1 lesson
A browser inside a browser, a way of merging two people's edits that is neither of the two textbook answers (OT, CRDT), one process per document, and undo when someone else already moved it.
13Google Maps1 lesson
The road graph and routing algorithm underneath the blue line, traffic-aware alternates, tile serving, and the geospatial index that finds nearby places.
14Google Search1 lesson
The crawler, the inverted index it feeds, query serving and ranking, and how freshness and tiered serving keep an index of the whole web current.
15Instagram1 lesson
How three engineers shipped it, then sharding and IDs, the celebrity problem in a feed, and Python holding at three billion requests a day.
16Netflix1 lesson
A read-heavy streaming giant, end to end - encode, cache, recommend.
17OpenRouter1 lesson
One API in front of every model - routing, wiretapping traffic it has to bill for, counting tokens it doesn't own, and the one thing a reseller can't copy.
18Slack1 lesson
The monolith that never died, the thundering herd on reconnect, a shard key that lied, and a queue that could not drain itself.
19Stripe1 lesson
Idempotency as the API's first principle, a state machine for moving money, a double-entry ledger, and the card-network rails underneath all of it.
20Twitter (X)1 lesson
Timeline fan-out on write versus read, posting and reading at the same instant for millions, and the social graph that decides who sees what.
21Uber1 lesson
A location firehose feeding a geo-index, dispatch and matching, and surge pricing as a live market clearing supply against demand.
22WhatsApp1 lesson
The persistent connection every phone holds open, a message's trip from Mumbai to Virginia, and end-to-end encryption that keeps the server from reading it.
23YouTube1 lesson
A nine-engineer beginning, Vitess sharding MySQL underneath it, the transcode factory behind a billion hours watched a day, and Content ID fingerprinting at that scale.
24Zomato1 lesson
Search and discovery, the order lifecycle, assignment and batching of delivery partners, live tracking, and a three-sided payment system underneath it.
Borrowed from other tracks (13)
You don't need to take those tracks. These are the only lessons this track uses from them, and each is linked where it is needed.
- One address, a thousand doorsNetworking · needed for The chai stall that got famous (load balancing)
- How a parcel finds any house on earthNetworking · needed for The Contract at the Counter (API design)
- The Memory Hierarchy (cache, locality, the memory wall)How Computers Work · needed for Claude - the case study
- HashingDSA · needed for Counting the crowd without a register (HyperLogLog, count-min, top-k)
- Trees (BST, balancing, heaps, tries)DSA · needed for Counting the crowd without a register (HyperLogLog, count-min, top-k)
- TransactionsData Systems · needed for The last vada (inventory contention and locking)
- Object Storage and the CDNDevOps · needed for The branch near your house (CDNs and object storage)
- TCP vs UDP, and the 3-way handshakeNetworking · needed for The customer who won't hang up (polling, SSE and WebSockets)
- HTTP Keep-AliveFrom Scratch · needed for The customer who won't hang up (polling, SSE and WebSockets)
- HTTP 07: Chunked EncodingFrom Scratch · needed for The customer who won't hang up (polling, SSE and WebSockets)
- AuthenticationSecurity · needed for A lock on every door of the stall (security inside a design)
- Authorization & IdentitySecurity · needed for A lock on every door of the stall (security inside a design)
- Transport & Network SecuritySecurity · needed for A lock on every door of the stall (security inside a design)