Think clearly about systems.

Not a catalogue of architectures to recite. How to size a system from one sentence, find what actually limits it, and say at what point your answer stops being true.

Start at the diagramNo signup. Chapter one assumes nothing.

How many servers does this need?

A notes app. Everyone writes a few dozen notes a day.

1server

34.72/s at peak

Still one. Drag until it is not.

What did you come here with?

12 situations. One way of reasoning underneath all of them, and the first one assumes you have never shipped anything.

Somebody drew the architecture on a whiteboard and I nodded.

Six boxes, five arrows, and nobody ever told you what any of them are. One request, followed all the way through, asking what each box is actually for.

The Diagram · 7 lessons

How big does this actually need to be?

One process, one database, and the four numbers that decide everything before any of this gets complicated.

One Service · 9 lessons

It was fine at 100 requests a second and fell over at 400.

It worked at a hundred requests a second and fell over at four hundred. Find what ran out, and why it ran out earlier than the hardware did.

Under Load · 7 lessons

A query that was fine for a year now takes 8 seconds.

Almost everything hard about a system is a value that got written down twice, or a query nobody looked at.

The Database · 7 lessons

Should I put Redis in front of it?

The two things everybody reaches for first, what each one actually buys, and the failure each one introduces.

Cache and Queue · 6 lessons

There are six services now and I cannot explain the latency.

There are six of them now, the latency went up, and nobody can say which one is responsible.

Several Services · 6 lessons

Retries turned a blip into a two-hour outage.

Systems rarely fall over. They are pushed, usually by something that was trying to help.

When It Breaks · 6 lessons

Every deploy drops requests for eight seconds.

Everything the first six tracks predicted, now measured on a machine you control and a deploy you can break.

Running It · 7 lessons

It broke at 2am. Where do I even look?

A system, a symptom, a query budget, and a number you commit to before you are allowed to be right.

On Call · 6 lessons

The agent loop ran for nine hours and spent a fortune.

The five problems that did not exist before, kept carefully apart from the twenty that did.

Models in Production · 7 lessons

Postgres or DynamoDB for this?

Named products, head to head, on a criterion written down first — and a date on every claim.

Choosing · 6 lessons

I have to defend this bill on Thursday.

The part of the job that is not technical, done by people whose authority is that they were right before.

The Decisions · 5 lessons

Every answer here comes with the size it stops working at.

“This doesn’t scale” is a slogan. Past about eight thousand writes a second a single primary stops keeping up is a claim, and you can check it. Every lesson in here declares the condition under which its own advice expires, and the arithmetic runs in front of you rather than sitting in a paragraph.

12 tracks · 79 lessons · ~18h · free, forever