Courses

System Design Case Studies

Whole systems, end to end: a social feed, a chat service, a payment ledger, a video platform and a search engine, each carried from the ask through its numbers, its hard part and its failure to a design you can defend.

Islands
5
Lessons
25
Exercises
145
DebugCode orderFill blankMultiple choiceShort answerTrace

Start the first lesson

  1. Island 1

    The Social Feed

    A home feed for a hundred million users: where a timeline lives, how it is ranked inside a latency budget, what the celebrity accounts do to the write path, and the whole design under a viral hour.

    1. Where a Timeline Lives5 exercises, 6 min
    2. Ranking Inside a Latency Budget5 exercises, 6 min
    3. Celebrities, Follows and Unfollows5 exercises, 6 min
    4. Checkpoint: Feed VariationsCheckpoint6 exercises, 6 min
    5. Boss: The Social FeedBoss8 exercises, 10 min
  2. Island 2

    The Chat Service

    Messaging for fifty million users: the long-lived connections and the servers that hold them, one order per conversation and delivery that survives a retry, presence and the offline device, and the whole design under a reconnect storm.

    1. Fifty Million Open Connections5 exercises, 6 min
    2. One Order per Conversation5 exercises, 6 min
    3. Presence, and the Offline Device5 exercises, 6 min
    4. Checkpoint: Chat VariationsCheckpoint6 exercises, 6 min
    5. Boss: The Chat ServiceBoss8 exercises, 10 min
  3. Island 3

    The Payments Ledger

    Money that must always add up: an append-only double-entry ledger, transfers that survive any retry, reconciliation against providers that retry too, and the whole design under a provider outage.

    1. An Append-Only Ledger5 exercises, 6 min
    2. Money That Survives a Retry5 exercises, 6 min
    3. Reconciling With the Outside World5 exercises, 6 min
    4. Checkpoint: Ledger VariationsCheckpoint6 exercises, 6 min
    5. Boss: The Payments LedgerBoss8 exercises, 10 min
  4. Island 4

    The Video Platform

    Uploads that become a dozen renditions, a backlog that must not eat the fleet, storage tiers priced by how often a video is watched, delivery that pays per byte, abuse that costs real money, and the whole design under a viral clip.

    1. The Transcoding Pipeline5 exercises, 6 min
    2. What a View Costs5 exercises, 6 min
    3. Delivery, and the Bytes Nobody Should Get5 exercises, 6 min
    4. Checkpoint: Video VariationsCheckpoint6 exercises, 6 min
    5. Boss: The Video PlatformBoss8 exercises, 10 min
  5. Island 5

    The Search Engine

    Search over a billion documents: an index sharded by document with a query fanned out and merged, an indexing pipeline that keeps up with the web's changes, autocomplete inside a keystroke, and the whole design under a query that half the world types at once.

    1. An Index Too Big for One Machine5 exercises, 6 min
    2. Keeping Up With a Billion Pages5 exercises, 6 min
    3. Autocomplete Inside a Keystroke5 exercises, 6 min
    4. Checkpoint: Search VariationsCheckpoint6 exercises, 6 min
    5. Boss: The Search EngineBoss8 exercises, 10 min