System Design
One server is easy. The hard part is staying fast when a million people show up at once. These lessons build that toolkit from zero — servers, scaling, caching, databases, and the tradeoffs behind every real-world system — explained like you've only just learned what a program is.
- 1
What is a server?
Easy▶ has animationA computer whose whole job is to answer other computers. The request/response loop, demystified.
- 2
Latency vs. throughput
EasyThe two speed numbers that get confused constantly. One is 'how long for ME'; the other is 'how many of us per second'.
- 3
Scaling up vs. scaling out
EasyToo many people asking? Make one server bigger, or add more servers. Each choice has a catch.
- 4
Stateless vs. stateful
MediumWhy 'the server remembers nothing about you' is secretly the trick that lets you add a hundred servers.
- 5
Load balancers
Medium▶ has animationYou have ten servers — but who decides which one answers each request? A traffic cop called a load balancer.
- 6
Caching
Medium▶ has animationKeep a copy of the answer close by, so you don't redo the slow, expensive work every single time.
- 7
Database indexes
MediumFinding one row by checking every row is painfully slow. An index is the page-finder at the back of a book.
- 8
Replication
Medium▶ has animationKeep COPIES of your database on several machines — so if one dies your data survives, and many copies can answer readers at once.
- 9
Sharding
HardWhen the data is too big for one machine, split it into pieces across many machines. The art is picking HOW to split it.
- 10
The CAP theorem
HardWhen the network between your copies breaks, you must choose: keep answering with maybe-old data, or stop until you're sure it's right. You can't have both.
- 11
Message queues
Medium▶ has animationDon't make the user wait for slow work. Drop a to-do note in a queue and let a worker do it later.
- 12
Rate limiting
MediumStop any one user from flooding you with requests. You get N tries per minute — then you wait.
- 13
Capstone: design a URL shortener
HardTurn a giant link into a tiny one like tinyurl — and watch every tool you learned snap into place.