AlgoViz
🏗️ Build systems that don't fall over

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. 1

    What is a server?

    Easy▶ has animation

    A computer whose whole job is to answer other computers. The request/response loop, demystified.

  2. 2

    Latency vs. throughput

    Easy

    The two speed numbers that get confused constantly. One is 'how long for ME'; the other is 'how many of us per second'.

  3. 3

    Scaling up vs. scaling out

    Easy

    Too many people asking? Make one server bigger, or add more servers. Each choice has a catch.

  4. 4

    Stateless vs. stateful

    Medium

    Why 'the server remembers nothing about you' is secretly the trick that lets you add a hundred servers.

  5. 5

    Load balancers

    Medium▶ has animation

    You have ten servers — but who decides which one answers each request? A traffic cop called a load balancer.

  6. 6

    Caching

    Medium▶ has animation

    Keep a copy of the answer close by, so you don't redo the slow, expensive work every single time.

  7. 7

    Database indexes

    Medium

    Finding one row by checking every row is painfully slow. An index is the page-finder at the back of a book.

  8. 8

    Replication

    Medium▶ has animation

    Keep COPIES of your database on several machines — so if one dies your data survives, and many copies can answer readers at once.

  9. 9

    Sharding

    Hard

    When the data is too big for one machine, split it into pieces across many machines. The art is picking HOW to split it.

  10. 10

    The CAP theorem

    Hard

    When 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. 11

    Message queues

    Medium▶ has animation

    Don't make the user wait for slow work. Drop a to-do note in a queue and let a worker do it later.

  12. 12

    Rate limiting

    Medium

    Stop any one user from flooding you with requests. You get N tries per minute — then you wait.

  13. 13

    Capstone: design a URL shortener

    Hard

    Turn a giant link into a tiny one like tinyurl — and watch every tool you learned snap into place.