How Backend Systems Scale

A 8-part series.

  1. Part 1

    From Code to Service: Requests, APIs, and Web Servers

    Follow requests from clients to web servers, clarify requirements, and understand APIs, protocols, concurrency, and application tiers.

  2. Part 2

    Estimate Capacity, Find Bottlenecks, and Set Useful SLOs

    Use powers of ten to size storage, caches, and servers, then reason about throughput, latency, availability, and service targets.

  3. Part 3

    Unique IDs: Counters, Base62, Hashes, and Key Pools

    Work through ID generation with Base62 code, capacity math, collision handling, coordinated ranges, and pre-generated key pools.

  4. Part 4

    Storage from First Principles: Logs, Indexes, and Transactions

    Connect key-value logs, documents, relational tables, indexes, SQL, normalization, and transactions through worked examples.

  5. Part 5

    Route and Deliver Requests: Load Balancers, DNS, and CDNs

    Understand proxies, health checks, redundant load balancers, DNS routing, anycast, and CDN caching through a photo app.

  6. Part 6

    Caching from First Principles: Policies, LRU, and Cache Tiers

    Learn cache reads and writes, invalidation, read-through loading, eviction, and an LRU implementation with operation traces.

  7. Part 7

    Replication and Consistency: Leaders, Quorums, and CAP

    Trace replication lag, multi-leader conflicts, quorum reads and writes, failure tolerance, and CAP with concrete examples.

  8. Part 8

    Sharding and System Design: Placement, Movement, and Trade-offs

    Work through shard keys, modulo routing, logical buckets, consistent hashing, migrations, and three complete design reviews.