Architecture conversations kept surfacing the same decisions: how consistent does this need to be, where does it shard, what gets cached and at what level. I started keeping notes on the reasoning rather than the answers - the trade-offs that drive the design, not the design itself.

Chapter 1 covers the vocabulary everything else in the series links back to: scalability, CAP theorem, consistency models, caching, sharding, and a 7-step framework for working through a design problem. Each subsequent chapter applies that vocabulary to a specific system: stated requirements, explicit trade-offs, and a final design.

Every design choice exchanges one property for another:

  • strong consistency costs latency
  • horizontal scaling costs coordination
  • microservices cost operational overhead

The series

Chapter 1 - Fundamentals

Core concepts (scalability, CAP theorem, consistency models, fault tolerance), building blocks (load balancers, caches, databases, message queues), architecture patterns, and a 7-step framework for working through design problems.

How I work through a design problem (from Chapter 1):

  1. Clarify requirements
  2. Estimate scale
  3. Define the API
  4. Design the data model
  5. Sketch the high-level design
  6. Deep-dive
  7. Address bottlenecks and failure modes

Chapter 2 - URL Shortener (coming soon)

Base62 ID generation, the 301 vs 302 redirect trade-off, NoSQL storage, and Redis caching for a write-once system reading at 100K+ req/s.

Chapter 3 - Rate Limiter (coming soon)

Token bucket vs sliding window vs fixed window algorithms; where it sits in the request path; distributed rate limiting across multiple nodes.

Chapter 4 - Distributed Cache (coming soon)

Cache invalidation strategies, eviction policies, thundering herd, and cache-aside vs write-through vs write-behind patterns.

Chapter 5 - Notification System (coming soon)

Fan-out, multi-channel delivery (push, email, SMS), retry and deduplication, and the trade-off between fan-out-on-write and fan-out-on-read.

Chapter 6 - News Feed (coming soon)

Fan-out-on-write vs fan-out-on-read; the consistency vs latency trade-off that defines most feed systems; ranking and relevance at scale.

Chapter 7 - Distributed Job Scheduler (coming soon)

Idempotency, exactly-once vs at-least-once delivery, leader election, and fault tolerance for scheduled and recurring jobs.


Notes

  1. Each chapter links back to Chapter 1 for any concept it uses rather than re-explaining it - read Chapter 1 first if a concept in a design chapter is unclear.
  2. Next: Chapter 1 - Fundamentals