Case studies
Each of these is a guided build rather than an article, and each follows the same seven beats: requirements, estimation, a first design, watching it break, finding the bottleneck, changing one thing, and running it again.
The fourth beat is not optional. Every naive design here is one a competent person would draw in the first ten minutes, with the flaw that ten minutes leaves in — because a case study whose first design works has told you the answer, and being told the answer is how people end up able to recite an architecture and unable to reason about one.
- A URL shortener12 minThe classic opener. A read-heavy service where the naive design puts every redirect on the database, and the fix is one component.cache basics · utilisation · sharding
- A news feed15 minFan-out on read against fan-out on write, and the celebrity problem that means the answer is both.tail latency · sharding · cache basics
- A chat system14 minLong-lived connections, a backplane whose cost grows with server count, and the slow consumer that takes a server down.websocket fanout · message queues · idempotency
- A distributed rate limiter10 minA small component with a surprising number of ways to be wrong — including one that lets through twice the limit and never shows it.rate limiting · cache stampede · retry storm
- A ride-hailing dispatcher13 minA geospatial matching problem where the partition key is a place, and places are the most skewed key there is.sharding · replication lag · distributed locks
- A notification service11 minThird-party providers you do not control, at-least-once delivery, and the duplicate charge that follows.idempotency · outbox · retry storm
- A distributed cache12 minWhere the keys go, what happens when a node dies, and the stampede that follows every expiry.consistent hashing · cache stampede · eviction policies
- A metrics pipeline11 minA firehose where dropping data is the correct answer, and the backlog is the only metric that matters.backpressure · storage engines · message queues
- A payment ledger14 minThe one system where eventual consistency is not an option, and where duplicate delivery is a bill.idempotency · outbox · cap partition