How Backend Systems Scale
A 8-part series.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.