Course 02 · System design · writing in public
System design, one trade-off at a time.
Learn the building blocks behind every large system, see where real companies use them, and practise designing with one framework until it's habit. Diagrams you can step through, labs you can play with, and a single system that grows from one server to millions.
You should know
How to build a basic web app or API, and roughly what a database does.
You'll need
A browser for the labs. Docker, if you want to run the code (our Docker course covers it).
You'll leave with
A framework for any design question, the building blocks to fill it, and 22 designs worked end to end.
Part 1 · How to think about systems
The approach
What system design is, the numbers to know, and one framework for every design.
- 01.01What system design is, and what interviews test10m
- 01.02Functional and non-functional requirements10m
- 01.03Availability, durability, consistency, latency, cost12m
- 01.04Numbers to know10m
- 01.05Back-of-the-envelope estimation14m
- 01.06Trade-offs: there is no best design9m
- 01.07The design framework, step by step12m
- 01.08When not to add infrastructure8m
From one server to millions
One system, Snip, grown a step at a time.
Networking and APIs
How requests travel, and how services talk without falling over.
- 03.01What happens when you type a URL12m
- 03.02TCP vs UDP8m
- 03.03REST, gRPC and GraphQL11m
- 03.04API design: resources, pagination, versioning, errors13m
- 03.05Realtime: polling, SSE and WebSockets11m
- 03.06Load balancers12m
- 03.07Reverse proxies and API gateways9m
- 03.08Service-to-service communication10m
- 03.09Timeouts, retries, backoff and jitter11m
- 03.10Idempotency keys10m
- 03.11Backpressure and load shedding10m
- 03.12Tail latency and why p99 matters9m
Part 2 · Building blocks
Databases and data modeling
How relational databases store, find and protect data, and when to reach for something else.
- 04.01Relational modeling and normalisation12m
- 04.02Indexes and B-trees13m
- 04.03Reading a query plan10m
- 04.04Transactions and isolation levels13m
- 04.05MVCC10m
- 04.06Write-ahead logs and crash recovery10m
- 04.07Replication: leaders, followers and lag12m
- 04.08Scaling a relational database11m
- 04.09Schema changes and online migrations11m
- 04.10NoSQL families12m
- 04.11Choosing a database10m
- 04.12Denormalisation9m
Partitioning and IDs
Splitting data across machines, and naming things when there's no single counter.
Caching
Fast reads, and the ways caches go wrong.
Async work and streams
Queues, logs and the guarantees they really give you.
- 07.01Why move work off the request path8m
- 07.02Queues vs logs11m
- 07.03Delivery guarantees and idempotent consumers11m
- 07.04Partitions, consumer groups and ordering11m
- 07.05A job queue on Postgres with SKIP LOCKED13m
- 07.06The outbox pattern and change data capture11m
- 07.07Delayed and scheduled jobs9m
- 07.08Workflows and sagas11m
- 07.09Fan-out patterns9m
Distributed systems essentials
Partial failure, consistency, consensus and time.
- 08.01Partial failure9m
- 08.02Consistency models12m
- 08.03CAP and PACELC, without the myths11m
- 08.04Replication and quorums13m
- 08.05Clocks and ordering11m
- 08.06Consensus and Raft, intuitively14m
- 08.07Leader election and leases10m
- 08.08Distributed locks and fencing tokens11m
- 08.09Circuit breakers and bulkheads9m
- 08.10Gossip and membership9m
- 08.11Two-phase commit vs sagas11m
Storage under the hood
How data actually reaches the disk, and stays correct there.
Search
Finding things fast, and ranking what you find.
Counting and analytics
Counting billions of things, approximately and on purpose.
Realtime, feeds and location
Live connections, timelines and things near you.
Files and media
Uploads, images, video and sync.
Reliability, security and operations
Keeping it up, knowing when it isn't, and changing it safely.
- 14.01Observability: logs, metrics, traces11m
- 14.02SLOs and error budgets10m
- 14.03Rate limiting algorithms12m
- 14.04Where to put a rate limiter9m
- 14.05Safe deploys10m
- 14.06Database migrations without downtime11m
- 14.07Backups, RPO and RTO10m
- 14.08Multi-region and disaster recovery12m
- 14.09Multi-tenancy and noisy neighbours10m
- 14.10Authentication, authorisation and abuse11m
- 14.11Data retention, deletion and privacy9m
Part 3 · Designs
Classic designs
The problems every system design interview draws from.
- 15.01Design: a URL shortener on one machineDESIGN20m
- 15.02Design: a URL shortener at scaleDESIGN25m
- 15.03Design: a rate limiterDESIGN20m
- 15.04Design: a key-value storeDESIGN25m
- 15.05Design: a unique ID generatorDESIGN15m
- 15.06Design: a web crawlerDESIGN22m
- 15.07Design: a notification systemDESIGN20m
- 15.08Design: a news feedDESIGN25m
- 15.09Design: chat and messagingDESIGN25m
- 15.10Design: search autocompleteDESIGN20m
- 15.11Design: a distributed job schedulerDESIGN22m
Product designs
Real products, end to end.
- 16.01Design: ticket bookingDESIGN25m
- 16.02Design: a payment systemDESIGN25m
- 16.03Design: ride matchingDESIGN25m
- 16.04Design: nearby placesDESIGN20m
- 16.05Design: a video platformDESIGN25m
- 16.06Design: file syncDESIGN25m
- 16.07Design: a collaborative editorDESIGN25m
- 16.08Design: a leaderboardDESIGN18m
- 16.09Design: ad click aggregationDESIGN22m
- 16.10Design: metrics and alertingDESIGN22m
- 16.11Design: a distributed message queueDESIGN25m
Part 4 · Case studies
Case studies
What real companies built, what broke, and what we can learn.
- 17.01Case: Instagram's early architectureCASE15m
- 17.02Case: Twitter's Snowflake IDsCASE12m
- 17.03Case: Amazon's Dynamo paperCASE18m
- 17.04Case: Memcache at FacebookCASE18m
- 17.05Case: Discord's message storageCASE15m
- 17.06Case: Stripe's idempotency keys and rate limitersCASE15m
- 17.07Case: Slack's job queueCASE14m
- 17.08Case: Figma's multiplayerCASE15m
- 17.09Case: Netflix Open ConnectCASE14m
- 17.10Case: GitLab's 2017 database incidentCASE14m