System Design

One lesson a day, in order

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.

All lessons

Your progress

Loading your progress

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.

Podcast feed

Phase 1

Foundations

Why one machine stops being enough, and the handful of ideas every distributed system is built from.

Done0 / 22

  1. Lesson 011: Read Replicas: Reading From a Copy

    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

  2. Lesson 019: Idempotency: Safe to Retry

    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

  3. Lesson 021: Rate Limiting: Saying No Gracefully

    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

The examples

Three made-up systems, used in every lesson

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.

  • Marlow Books

    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.

  • Stagefront

    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.

  • Galewatch

    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.