Lesson 001: Why One Server Is Never Enough
One box running your app and database is a real architecture with three hard ceilings: it gets slow, it fills up, and it disappears.
19 min read
System Design
A course in system design, written as a handbook: it starts from a single server and a single database and builds, one idea at a time, to designing whole systems at scale. Read it in order. Every lesson names the ones it stands on.
22 of 90 lessons published. One more usually arrives every morning. Progress is saved in this browser only.
Add this feed to any podcast app.
Phase 1
Why one machine stops being enough, and the handful of ideas every distributed system is built from.
Done0 / 22
One box running your app and database is a real architecture with three hard ceilings: it gets slow, it fills up, and it disappears.
19 min read
The handful of latency numbers worth memorising, why round trips cost more than bytes, and how to tell if a design is plausible before you build it.
16 min read
Availability is a definition before it is a measurement: how to turn nines into hours, why downtime adds, and what redundancy cannot fix.
19 min read
What a browser actually does in the 180 milliseconds before your server hears a byte, and why every one of those steps can fail invisibly.
19 min read
A bigger machine is the cheapest fix and buys most products years of runway. The reason teams go horizontal anyway is almost never capacity.
17 min read
A balancer has to answer two questions about your fleet. The one about which boxes are alive is where the outages are, and almost nobody gets it right first.
20 min read
Making a service stateless does not delete its state, it moves it, and each of the four places you can move it to sends you a different bill.
19 min read
A cache is a copy kept closer plus a rule for when to stop believing it, and the number that decides everything is what still reaches the database.
20 min read
Invalidation retires a cached entry when the data changes rather than when a clock runs out, and the TTL you keep is still what bounds how wrong you get.
20 min read
What actually makes a query cost what it costs, why an index can be present and useless, and the ratio to ask for before you read the SQL.
20 min read
What streaming replication actually copies, why every replica does all of your writing, which reads are allowed to move, and the error that only happens on a copy.
20 min read
Where the delay between a primary and its copy comes from, how to measure it honestly, and four ways to stop a customer losing their own write.
20 min read
What a shard is, the arithmetic of splitting one dataset across machines, why a sharded system always costs you the maximum rather than the average, and what stops working.
19 min read
How to pick the column that decides where every row lives, the arithmetic of skew, and why this is the one Phase 1 decision you cannot undo cheaply.
17 min read
What a transaction actually guarantees on one machine, why wrapping two statements in BEGIN does not stop an oversell, and what each isolation level really costs.
19 min read
Why a store is a bundle of promises rather than a brand, what each shelf charges, and where Marlow's 216 gigabytes of cover images should have been living.
20 min read
What a queue actually buys, worked out on a wind farm backlog that took twenty two minutes to absorb eighty six seconds of work.
20 min read
A payout that never ran and nobody noticed for eleven days, the sum of a retry schedule nobody computed, and why absence is the one thing your instruments cannot see.
19 min read
Seventeen card charges in December with no order behind them, and the difference between an operation that is atomic and one that is genuinely safe to run twice.
20 min read
A payment provider had a bad thirty seconds and a ticketing service sold nothing for thirty nine minutes, and almost all of that was its own retry code.
20 min read
A bookshop's rate limit sat idle for six months, then refused twelve hundred customers on its busiest morning and never once refused the robot it was written for.
20 min read
A bookshop put 1.2 million unchanging cover images behind a CDN with a one year expiry, measured a 62% hit rate, and found no dial attached to it.
20 min read
The examples
None of these exist. They are invented for this course and reused from lesson to lesson on purpose, so their numbers become familiar and each new idea lands on ground you already know. When a lesson says Marlow Books, this is who it means.
A small online bookshop
Four people, one server and one Postgres database. About 40 requests a second on a normal day and ten times that in the week before Christmas. The one box that the early lessons stress until it breaks.
An event ticketing service
Quiet most of the time, then a stadium show goes on sale at 10:00 and two hundred thousand people press the same button in the same minute. Oversold seats are a lawsuit, so correctness matters as much as speed.
Telemetry for wind farms
Nine hundred turbines, a reading every two seconds, over links that drop for hours in bad weather and come back with a backlog. Dashboards that lag by seconds, reports that scan a year.