System Design — The Complete Guide
This series teaches system design the way it actually gets used — not as a list of buzzwords, but as a small set of mechanisms you combine differently for every problem. Every article works through a real design end to end: requirements, capacity estimates, a high-level architecture, then the deep dive where the interesting trade-offs live.
What you’ll learn: How to scale a single server to millions of users, how to size a system on the back of an envelope, and how to design twenty-eight real architectures — rate limiters, key-value stores, news feeds, chat, video, file sync, maps, message queues, monitoring, payments and an exchange — knowing not just what the design is, but why every alternative was rejected.
Who it’s for: Engineers preparing for system design interviews, and anyone who wants to understand how large-scale systems genuinely work. No prior distributed systems background assumed.
Volume 1 — Foundations and Core Designs
Foundations
Start here. These three give you the vocabulary, the arithmetic, and the interview method every later chapter assumes.
- Scale From Zero to Millions of Users — Evolve one server into a multi-datacenter system: load balancers, replication, caching, CDN, stateless tiers, message queues, and sharding.
- Back-of-the-Envelope Estimation — Power-of-two tables, latency numbers, and a repeatable method for estimating QPS, storage, bandwidth, and memory.
- A Framework for System Design Interviews — The 4-step framework, time budgets per step, worked examples, and the dos and don’ts that decide the outcome.
Core building blocks
The components that appear inside almost every design that follows.
- Design a Rate Limiter — All five algorithms compared, Redis-backed counters, and the race conditions that appear only when you distribute it.
- Design Consistent Hashing — Hash rings, virtual nodes, and why this one algorithm underpins DynamoDB, Cassandra, Discord, and Akamai.
- Design a Key-Value Store — CAP in practice, quorum tuning, vector clocks, gossip, Merkle trees, and the full read and write paths.
Services at scale
Standalone systems, each built around one hard constraint.
- Design a Unique ID Generator — Snowflake from first principles, plus UUIDv7 and ULID and how to choose between them today.
- Design a URL Shortener — Base62, why seven characters is exactly right, and the 301-vs-302 choice that quietly destroys your analytics.
- Design a Web Crawler — The URL frontier, politeness and priority, spider traps, SimHash near-duplicate detection, and what RFC 9309 changed.
- Design a Notification System — Per-channel queues, why exactly-once delivery is impossible, priority lanes, and retry logic that doesn’t amplify outages.
Large-scale products
Full consumer products. Each takes the building blocks above and pushes them until something breaks.
- Design a News Feed System — Fan-out on write vs on read, why one celebrity account breaks the obvious design, and the hybrid everyone actually ships.
- Design a Chat System — WebSocket over polling, server-assigned sequence numbers for ordering, multi-device sync, presence, and reconnect storms.
- Design a Search Autocomplete System — Sub-100ms suggestions on every keystroke: tries with cached top-k, offline ranking, and the trending-query gap.
- Design YouTube — Transcoding as a DAG, adaptive bitrate ladders, resumable uploads, and the cost work that decides whether the business survives.
- Design Google Drive — Delta sync, content-defined chunking, conflict resolution that never loses data, and the dedup trick that leaks information.
Volume 2 — Advanced Designs
Harder problems, the ones that come up most often for senior roles. Every chapter here has something interactive — a calculator, a simulator, or a working model of the idea.
Location services
Geospatial data, static and moving.
- Design a Proximity Service — Why two B-tree indexes are not a 2D index, and how geohash, quadtrees, S2 and H3 each fold two dimensions into one. Interactive geohash encoder.
- Design Nearby Friends — The same problem with moving data: 333K location updates a second becoming 13.3 million. Interactive fan-out calculator.
- Design Google Maps — 100 petabytes of tiles, a road graph too large for memory, and CDN economics that decide the design. Interactive tile explorer.
Streams and pipelines
Moving and aggregating enormous volumes of events.
- Design a Distributed Message Queue — Why an append-only file beats a database, how partitions make ordering tunable, and what exactly-once costs. Interactive delivery-semantics explorer.
- Design a Metrics Monitoring and Alerting System — Time-series storage, pull versus push, Gorilla compression, and the cardinality bomb. Interactive cardinality calculator.
- Design an Ad Click Event Aggregation System — Event time versus processing time, watermarks, and exactly-once as a genuine requirement. Interactive watermark simulator.
Storage and retrieval
Keeping data, finding it again, and not losing it.
- Design a Distributed Email Service — Two exabytes a year, forty-year-old protocols, and the deliverability problem that isn’t engineering. Interactive deliverability checker.
- Design S3-like Object Storage — Eleven nines on hardware that fails constantly: immutability, replication versus erasure coding. Interactive durability calculator.
- Design a Real-time Gaming Leaderboard — Why SQL cannot rank 25 million players, and how a skip list makes it logarithmic. Live leaderboard.
Money and correctness
Where being slightly wrong is not an option.
- Design a Hotel Reservation System — Three transactions a second, and double booking: locking strategies and the one-statement fix. Interactive race simulator.
- Design a Payment System — Double-entry bookkeeping, idempotency, and reconciliation as the last line of defence. Interactive ledger.
- Design a Digital Wallet — Four designs, each fixing what the last one broke: 2PC, TC/C, Saga, then event sourcing over Raft. Interactive event replay.
- Design a Stock Exchange — The one design that scales in rather than out: a single server, mmap as a message bus, an O(1) order book. Interactive matching engine.
Where to go next
What to Read Next — a method for reading an engineering post so it leaves you something reusable, then the papers, blogs and courses worth your evenings.
How to read this series
Preparing for an interview? Read Part 1 in order, then pick any four designs from Parts 3 and 4. The framework in Chapter 3 is what you’ll actually perform under time pressure — the case studies are practice reps for it.
Learning distributed systems? Read Parts 1 and 2 in order. Consistent hashing and the key-value store chapter carry most of the theory the rest of the series leans on.
Already comfortable? Jump straight to whichever product interests you. Every case study is self-contained and links back to the concepts it depends on.