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.
| You are | Start at | Target |
|---|---|---|
| A university student / fresh grad, zero industry experience | 00 — Getting Started | Junior / Associate SWE, internships |
| 1–3 years experience, comfortable coding, shaky on architecture | 01 — Foundations (skim), then 02 — Building Blocks | Mid-level SWE (SDE-2, L4) |
| 4+ years, want to pass senior-level design rounds | 04 — Distributed Systems and 12 — Case Studies | Senior SWE (L5), Staff |
| Interview is next week | ⚡ Interview Crash Course | Damage control 🙂 |
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.
- 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.
Orientation. What this field even is, and how to study it.
- What Is System Design?
- How to Use This Guide
- Prerequisites & Self-Assessment
- The Interview Formats You'll Face
- Glossary — every term in this repo, in one page
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
The Lego bricks. Every system you will ever design is these, arranged differently.
- Load Balancers
- Proxies: Forward and Reverse
- API Gateway
- CDN — Content Delivery Networks
- Caching — The Complete Guide ⭐
- Databases: SQL vs NoSQL
- Database Indexing
- Replication
- Sharding & Partitioning
- Message Queues & Pub/Sub
- Apache Kafka Deep Dive
- Search Systems & the Inverted Index
- Blob / Object Storage
- Consistent Hashing ⭐
- Rate Limiting
- Unique ID Generation at Scale
- Bloom Filters & Probabilistic Data Structures
- Coordination Services: ZooKeeper, etcd, Consul
- Schedulers, Cron, and Background Jobs
- WebSockets, SSE, and Long Polling
- Geospatial Indexing: Geohash, Quadtrees, S2
- Storage Engines: B-Trees vs LSM-Trees
- Transactions and ACID
- Isolation Levels & Anomalies
- Data Modeling: Relational
- Data Modeling: NoSQL Access-Pattern-First
- Choosing a Database: A Decision Guide
- Time-Series Databases
- Graph Databases
- Data Warehouses, Lakes, and Lakehouses
- Batch vs Stream Processing
- Change Data Capture
- Database Migrations Without Downtime
- 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
- Monolith vs Microservices
- Service Decomposition: Where to Draw the Lines
- Event-Driven Architecture
- CQRS
- Event Sourcing
- Layered, Hexagonal, and Clean Architecture
- Serverless
- Service Mesh & Sidecars
- Backend for Frontend (BFF)
- The Strangler Fig: Migrating Legacy Systems
- Multi-Tenancy
- Anti-Patterns: The Hall of Shame
- API Design Principles
- REST Done Properly
- GraphQL
- gRPC and RPC
- Pagination, Filtering, and Sorting
- Versioning and Backward Compatibility
- Webhooks and Callbacks
- Error Handling Contracts
- Authentication vs Authorization
- Sessions, JWTs, and OAuth 2.0 / OIDC
- Encryption in Transit and at Rest
- Secrets Management
- The OWASP Top 10 for System Designers
- DDoS Protection and Abuse Prevention
- Privacy, PII, and Compliance (GDPR)
- The Three Pillars: Logs, Metrics, Traces
- Monitoring and Alerting That Doesn't Suck
- SLIs, SLOs, SLAs, and Error Budgets
- Distributed Tracing
- Incident Response and Blameless Postmortems
- Chaos Engineering
- Virtual Machines, Containers, and Docker
- Kubernetes for System Designers
- CI/CD Pipelines
- Deployment Strategies: Blue-Green, Canary, Rolling
- Feature Flags and Progressive Delivery
- Infrastructure as Code
- Cloud Provider Primitives (AWS / GCP / Azure Rosetta Stone)
- Multi-Region and Disaster Recovery
- Capacity Planning and Autoscaling
- Cost Optimization
- How to Find a Bottleneck
- Scaling Reads
- Scaling Writes
- Hot Keys and Celebrity Problems
- The Thundering Herd and Cache Stampedes
- Connection Pooling and Resource Limits
- Scaling Story: 1 user → 1 billion users ⭐
- The Framework: How to Drive a 45-Minute Design Round ⭐
- Requirements Gathering: The Questions to Always Ask
- Estimation in the Interview
- Drawing Diagrams That Communicate
- Deep Dives: How to Go Three Levels Down
- Trade-off Vocabulary: Sounding Senior
- What Interviewers Actually Score You On (Rubrics by Level)
- The 25 Most Common Mistakes
- Handling "I Don't Know"
- The Object-Oriented / Low-Level Design Round
- Mock Interview Scripts (with interviewer notes)
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)
- Design a URL Shortener (TinyURL)
- Design a Pastebin
- Design a Rate Limiter
- Design a Key-Value Store
- Design a Web Crawler
- Design a Notification System
- Design an Online Parking Lot / Ticketing System
Tier 2 — Core interview canon (mid/senior)
- Design Twitter / X
- Design Instagram
- Design a News Feed
- Design WhatsApp / Messenger
- Design YouTube / Netflix
- Design Google Drive / Dropbox
- Design Uber / Careem
- Design a Food Delivery System (Talabat / DoorDash)
- Design Search Autocomplete
- Design a Distributed Cache
- Design a Job Scheduler
- Design an E-Commerce System (Noon / Amazon)
- Design a Payment System
- Design a Ticketing System (Ticketmaster / BookMyShow)
- Design a Hotel Booking System
Tier 3 — Senior and above
- Design Google Search
- Design Google Maps
- Design a Metrics & Monitoring System
- Design a Distributed Message Queue
- Design a Log Aggregation System
- Design an Ad Click Aggregator
- Design a Real-Time Leaderboard
- Design Collaborative Editing (Google Docs)
- Design a Stock Exchange / Trading System
- Design a Fraud Detection System
- Design a Recommendation System
- Design a Feature Flag Service
- Design a CI/CD Platform
- Design a Multiplayer Game Backend
- How to Practice (the deliberate-practice loop)
- Warm-Up Drills: 50 Estimation Questions
- Component Drills: 40 "What Would You Use?" Questions
- Trade-off Drills
- Practice Problems with Full Solutions
- Self-Grading Checklist
- Build-It-Yourself Projects
- 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
- Curated Books, Papers, Blogs, and Videos
- Engineering Blogs Worth Following
- The Papers That Built the Modern Internet
- Tools & Playgrounds
- Cheat Sheets
| 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
- ⭐ 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.
Corrections, additions, and new case studies are welcome. See CONTRIBUTING.md.
CC BY 4.0 for prose, MIT for code samples.