The System Design Handbook
A complete, beginner-first path from “I just graduated and I don’t know what a load balancer is”
to “I can confidently design and defend a distributed system in a Google interview.”
This repository is a course, not a cheat sheet. Every concept is explained from first
principles, with the why before the what, worked numbers, diagrams, real-world war stories,
and practice problems with full solutions.
No prior distributed-systems knowledge is assumed. If you can write a for-loop and you have
built (or seen) a CRUD web app, you have enough to start.
⚡ Prepping for an interview and short on time? You do not need to read all 16 parts. Start with
the Interview Crash Course — the curated 80/20 path (~30 chapters, ~10
case studies, a 1–3 week plan) through the material that actually gets tested.
Who this is for
Target companies this guide prepares you for:
- Local / regional (Pakistan, South Asia): Tkxel, Motive, Educative, Systems Ltd, Arbisoft,
VentureDive, 10Pearls, Careem, Bazaar, Retailo, Devsinc, Netsol.
- MENA / SEA scale-ups: Noon, Talabat, Careem, Swvl, Tabby, Tamara, Grab, Gojek, Delivery Hero.
- Global / Big Tech: Google, Meta, Amazon, Microsoft, Netflix, Uber, Stripe, Atlassian,
Datadog, Cloudflare, Shopify.
The bar differs (see 14 — Company Guides), but the material is the same.
What changes is depth, and how much of it you must produce unprompted.
How to use this repo
- Read How to Use This Guide first. It explains
the study loop (learn → build → explain → mock) that actually makes this stick.
- Follow a track from ROADMAP.md — there are 4-week, 12-week, and 24-week plans.
- Do not skip the numbers. Back-of-the-Envelope Estimation
is the single highest-leverage chapter in this repo.
- Explain out loud. Every chapter ends with “Explain it to a five-year-old” prompts and
Interview Soundbites. Say them to a wall. Seriously.
Each folder has its own README.md index. Each chapter is self-contained and links to what it depends on.
Table of Contents
Part 0 — Getting Started
Orientation. What this field even is, and how to study it.
Part 1 — Foundations
The physics of computing. Everything later is a consequence of these constraints.
- How a Computer Actually Runs Your Server
- Networking 101: The Journey of a Request
- IP, TCP, and UDP
- DNS: The Internet’s Phone Book
- HTTP, HTTPS, and TLS
- HTTP/1.1 vs HTTP/2 vs HTTP/3
- Client–Server, Peer-to-Peer, and Everything Between
- Latency Numbers Every Engineer Should Know
- Back-of-the-Envelope Estimation ⭐
- Performance: Latency, Throughput, and Percentiles
- Scalability: Vertical vs Horizontal
- Availability, Reliability, and the Nines
- Consistency Models
- CAP Theorem (and why PACELC is better)
- Concurrency, Parallelism, Threads, and Async
- Serialization: JSON, Protobuf, Avro, Thrift
Part 2 — Building Blocks
The Lego bricks. Every system you will ever design is these, arranged differently.
Part 3 — Data & Storage Deep Dive
Part 4 — Distributed Systems
- Why Distributed Systems Are Hard: The 8 Fallacies
- Failure Modes and Fault Tolerance
- Time, Clocks, and Ordering
- Leader Election
- Consensus: Paxos, Raft, ZAB
- Quorums and Read/Write Tradeoffs
- Gossip Protocols & Anti-Entropy
- Conflict Resolution: Vector Clocks, LWW, CRDTs
- Distributed Transactions: 2PC, 3PC
- The Saga Pattern
- Idempotency and Exactly-Once Delivery ⭐
- Distributed Locking
- Backpressure, Circuit Breakers, and Bulkheads
- Retries, Timeouts, and Jitter
Part 5 — Architecture Patterns
Part 6 — API Design
Part 7 — Security
Part 8 — Observability & Operations
Part 9 — Deployment & Infrastructure
Part 11 — The Interview
Part 12 — Case Studies
Full, interview-length designs. Each one: requirements → estimation → API → data model →
high-level design → deep dives → bottlenecks → follow-up questions.
Tier 1 — Start here (junior/mid)
Tier 2 — Core interview canon (mid/senior)
Tier 3 — Senior and above
Part 13 — Practice
Part 14 — Company Guides
- Interview Bar by Company Tier
- Pakistan & South Asia (Tkxel, Motive, Educative, Arbisoft, …)
- MENA & SEA (Noon, Talabat, Careem, Tabby, Grab, …)
- Big Tech (Google, Meta, Amazon, Microsoft, …)
- Startups vs Enterprises: What They Really Test
- Behavioral Round: The Other Half of the Loop
- Resume, Portfolio, and Getting the Interview
Part 15 — Resources
Study tracks
| Track |
Time |
For |
| 🔥 Sprint |
4 weeks |
Interview soon; you already have 2+ years experience |
| 🎯 Standard |
12 weeks |
The default. Fresh grad → interview-ready |
| 🧱 Deep |
24 weeks |
Zero background, or you want genuine mastery, not just interview passing |
Full week-by-week breakdowns: ROADMAP.md
Conventions used in this repo
- ⭐ marks a chapter that is disproportionately important. Do not skip these.
- 🧠 Mental model — an analogy to lock the idea in.
- 📐 Numbers — the arithmetic, done explicitly.
- ⚖️ Trade-off — what you give up.
- 🚨 Interview trap — a place candidates commonly lose points.
- 🎙️ Soundbite — a sentence you can say in an interview, verbatim.
- 🛠️ Try it — hands-on exercise.
Contributing
Corrections, additions, and new case studies are welcome. See CONTRIBUTING.md.
License
CC BY 4.0 for prose, MIT for code samples.