System Design Playbook
Interactive system design

Learn how big systems work, by playing with them.

Every concept comes with a live diagram you can poke at: change the load, break a server, add a cache and watch what happens. Start with the building blocks, then use them to design apps like YouTube or Netflix.

Today

🔥 0

day streak

⚡ 0

XP

Daily goal0 / 30 XP

Answer a quiz to start your streak.

Badges

✦First steps
◎Goal reached
🔥3-day streak
🔥7-day streak
🔥30-day streak
⚡100 XP
⚡500 XP
⚡2,000 XP

Your XP, streak and badges are shared by every playbook.

Learning path

Your learning path

Follow the units in order: concepts first, then real system designs, then design them yourself. Each lesson ends with a quick quiz, and completed units turn green.

  1. 00

    Unit 0 · 0/3 done

    Fundamentals

    How systems grow: scaling, estimates and getting updates to clients.

  2. 01
  3. 02

    Unit 2 · 0/4 done

    Performance & traffic

    Keeping things fast under load: caches, CDNs, balancers, limits.

  4. 03

    Unit 3 · 0/2 done

    Communication

    How services and clients talk to each other.

  5. 04

    Unit 4 · 0/5 done

    Async & cloud

    Queues, logs, serverless and doing work in the background safely.

  6. 05

    Unit 5 · 0/4 done

    Classic designs

    The first designs every interview prep covers.

  7. 06

    Unit 6 · 0/5 done

    Media & feeds

    Video, music and timelines for hundreds of millions.

  8. 07

    Unit 7 · 0/3 done

    Real time & marketplaces

    Chats, rides and deliveries that can't wait.

  9. 08

    Unit 8 · Ready

    Design it yourself

    Build each app on a canvas at 100 users, 1M and 100M+, and get it graded.

  10. ★

    Checkpoint · Ready

    Final lesson

    New questions about everything, with hearts and streaks.

Concepts

The building blocks

Short, visual explanations of the ideas that show up in every system design interview and in every real backend.

Data & databases

04Interactive

Query optimization & indexes

An index is a sorted copy of one or more columns that lets the database jump to the rows it needs instead of reading the whole table.

9 min read →
05Interactive

Sharding

Sharding splits one big database into several independent databases (shards), each holding a slice of the rows, so storage and writes scale with the number of machines.

8 min read →
06Interactive

Consistent hashing

Put servers and keys on the same hash ring; each key belongs to the next server clockwise. When a server joins or leaves, only the keys of one arc move, about 1/N of them, instead of almost all.

6 min read →
07Interactive

Types of databases

Each database type is optimized for a different shape of data and access pattern. Pick by the questions you need to answer fast, not by fashion.

10 min read →
08Interactive

CAP theorem

When a network partition splits your replicas, a system can stay Consistent (refuse what it can't answer correctly) or Available (answer anyway, maybe with old data). It can't do both until the network heals.

7 min read →
09Interactive

Read replicas

A read replica is a copy of the database that receives every change from the primary and answers read queries, so you can add read capacity without touching writes.

7 min read →
10Interactive

Precomputing values

Precomputing means doing the expensive work at write time (or on a schedule) and storing the result, so every read is a cheap lookup instead of a fresh calculation.

7 min read →
11Interactive

Partitioning strategies

Partitioning divides one large table into smaller pieces by a rule (by date, by region, by hash, or by columns), so each query only reads the pieces that can contain its answer.

8 min read →
System designs

System designs of real apps

YouTube, Netflix, WhatsApp, Uber… Each design reuses the building blocks above, and shows how the architecture changes from 100 users to hundreds of millions.

01100 users → 100M+ users

URL shortener

Store code → long URL in a key-value friendly table, generate unique short codes without collisions, and make the redirect path almost entirely cache hits.

12 min read →
02100 users → 100M+ users

Eventbrite (ticketing)

Treat ticket inventory as a strongly consistent counter (atomic updates, holds with TTL), put a waiting room in front of hot on-sales, and issue signed QR tickets that can be checked at the door.

13 min read →
03100 users → 100M+ users

Google Drive

Split files into content-addressed blocks in object storage, keep the folder tree, versions and permissions in a strongly consistent metadata store, and notify devices so they fetch only what changed.

13 min read →
04100 users → 100M+ users

Tinder

Find candidates with a geo search index, precompute each user's stack, store swipes in a write-optimised store, and detect matches with a fast "did they like me?" lookup.

12 min read →
05100 users → 100M+ users

YouTube

Upload straight to object storage, transcode asynchronously into many resolutions, stream small segments from a CDN, and keep metadata in a cached, replicated (later sharded) database.

14 min read →
06100 users → 100M+ users

Netflix

Encode each title into many bitrates, pre-position them on servers inside ISPs, run the control plane (accounts, home, playback) as cached microservices, and precompute personalization offline.

13 min read →
07100 users → 100M+ users

Spotify

Serve audio from a CDN plus the device's own cache, keep playlists in a horizontally scalable store, and treat every play as an event that feeds royalties, charts and batch-computed recommendations.

12 min read →
08100 users → 100M+ users

Instagram vs TikTok

Instagram's feed is mostly precomputed on write (fan-out to followers), with celebrities merged on read; TikTok's For You feed is recommendation-first: candidates come from what you might like, not from who you follow.

15 min read →
09100 users → 100M+ users

X / Twitter

Precompute home timelines in memory with hybrid fan-out, give every tweet a time-sortable Snowflake id, and run search and trends off a stream of tweet events.

13 min read →
10100 users → 100M+ users

WhatsApp

Each phone keeps a persistent connection to a chat server; a session map says which server each user is on; messages are stored until delivered and offline users are woken with push notifications.

13 min read →
11100 users → 100M+ users

Uber

Keep live driver locations in an in-memory geo index, match by ETA in the rider's area, track every trip as a state machine in a durable database, and stream GPS pings for everything else.

14 min read →
12100 users → 100M+ users

Uber Eats

Search restaurants with geo filters, keep each order in a state machine that publishes events, and dispatch couriers by predicted readiness, not just distance.

13 min read →

Test yourself

Did it stick?

Every page ends with 3 quick questions. When you've read them all, take the final lesson: new questions about every concept and design, one after another, with hearts and streaks.

Page quizzes completed0 / 34
Start the final lesson →

Let's talk

Got a project or an idea?

Products, teams, mentoring or collaborations: write to me and we'll take it from there.

Work with me →