Revision notes for system design interviews, organised in five parts so you can study in order or jump straight to what you need.
| Part | Question it answers |
|---|---|
| Part 0: Interview Framework | How do I run the interview and size the problem? |
| Part 1: Key Technologies | Which building block do I pick, and when? |
| Part 2: Core Concepts | Why do these systems behave the way they do? |
| Part 3: Common Patterns | What are the reusable solutions to recurring problems? |
| Part 4: Interview Problems | Can I combine all of it into a full design? |
| Part 5: Resources | What should I read or watch next? (books, papers, blogs, videos) |
Each note follows the same shape: TL;DR → core ideas → diagram → trade-offs → interview follow-ups → references. Diagrams are in resources/**; diagrams are SVG files that render directly on GitHub.
Suggested path: Part 0 → Part 1 (skim) → Part 3 → Part 4, and dip into Part 2 whenever a "why" comes up.
- Delivery framework: requirements → API → data model → high-level design → deep dives
- Functional vs non-functional requirements checklist
- Back of Envelope Estimation
What to reach for. Each page: what it is, when to use it, when not to, scaling model, consistency/durability guarantees, failure behaviour, and links to the concepts it relies on.
- Types of Databases (landscape & how to choose)
- SQL vs NoSQL (and NewSQL / distributed SQL)
- Database Indexes (B-Tree vs LSM-Tree)
- PostgreSQL & MySQL (relational deep dive)
- DynamoDB
- Cassandra
- MongoDB
- Distributed SQL deep dive: Amazon Aurora DSQL
- Time Series Databases
- Change Data Capture (CDC)
- Elasticsearch
- Vector Databases (RAG view: RAG & Vector Search)
- Synchronous vs Asynchronous Communication (Queues, Pub/Sub)
- Kafka
- SQS
- Kafka vs SQS
- Temporal (durable workflows)
- REST vs GraphQL vs gRPC
- Long Polling, WebSockets, SSE, Webhooks
- Service Discovery & Service Mesh
- API Design
Read top to bottom. Each page starts with a plain-words explanation and diagrams.
Foundations
- LLM Inference Basics
- How the Model Works (Transformer)
- GPU Architecture as a Distributed System
- Metrics, Roofline & Back-of-Envelope
Running it faster
- Continuous Batching & Scheduling
- KV Cache, Prefix Caching & Cache-Aware Routing
- Fast Kernels: FlashAttention, Fusion, CUDA Graphs
- Model Optimization: Quantization, Distillation, Pruning, Attention
- Speculative Decoding & Quantization
Scaling out
Production and related
- Serving Engines & Production Operations
- LLM Serving Platform: Gateway, Routing, Autoscaling
- RAG & Vector Search at Scale
- Distributed Training Overview
Why they work. Theory and trade-offs; each page ends with "where it shows up" links back to Part 1.
- Scalability
- Availability
- Reliability
- OSI Model
- TCP vs UDP (and HTTP/1.1, 2, 3)
- Data Modeling (entities, keys, indexes, normalization)
- Data Partitioning / Sharding
- Consistent Hashing
- Replication & Data Redundancy
- Quorum, Sloppy Quorum & Hinted Handoff
- Consistency Models & Patterns
- CAP Theorem and PACELC Theorem
- Time & Ordering (physical clocks, Lamport / vector / hybrid logical clocks)
- Transactions, ACID & Isolation Levels
- Distributed Transactions (2PC, 3PC, Saga)
- Idempotency
- Delivery semantics (at-most / at-least / exactly-once)
- Heartbeats & Failure Detection
- Gossip Protocol
- Resilience Patterns (Timeouts, Retries, Circuit Breaker, Bulkhead)
- Checksums
Reusable solutions that combine technologies and concepts. Format: problem it solves → approach → technologies used → trade-offs → example problems.
- Scaling reads (replicas, caching, CDN)
- Scaling writes (sharding, batching, write buffering via queues)
- Hot keys / hot partitions
- Fan-out on write vs fan-out on read
- Rate limiting, backpressure & load shedding (see also Resilience Patterns, Rate Limiter)
- Multi-region / geo-distribution
- Handling contention (optimistic vs pessimistic locking, distributed locks, queue serialisation) (see also Transactions, Distributed Locking)
- Multi-step processes (Saga, orchestration vs choreography, workflows) (see also Distributed Transactions)
- Reliable messaging (outbox, retries, DLQ, deduplication) (see also Idempotency)
- Long-running tasks (async jobs, workers, scheduling) (see also Job Scheduler)
- Real-time updates (polling vs SSE vs WebSockets vs pub/sub) (see also Long Polling, WebSockets, SSE)
- Large blobs (presigned URLs, chunked / resumable upload) (see also Blob Storage)
- Counting & dedup at scale (Bloom, CMS, HLL)
- Architecture Patterns (SOA, microservices, event-driven)
- Event sourcing, CQRS, change data capture
- Design Principles (SOLID)
Each problem lists the building blocks (Part 1), concepts (Part 2) and patterns (Part 3) it uses. Template for new problems: template.md
- Design Consistent Hashing (concept: Consistent Hashing)
- Design Distributed Key-Value Store
- Design Content Delivery Network (CDN) (concept: CDN)
- Design Distributed Cache
- Design Distributed Message Queue
- Design a File Storage System / GFS / HDFS
- Design an Object Storage System / S3 (concept: Blob Storage)
- Design Distributed Locking Service (concept: Distributed Locking)
- Design Distributed Counters
- Design Distributed Logging
- Design Metrics Monitoring and Alerting System
- Design Metrics Aggregation
- Design API Rate Limiter
- Design a Unique Id Generator & Key Generator
- Design a Url Shortener or Design a tiny url
- Design notification system
- Design Job Scheduler/Distributed Task Scheduler
- Design Location Based Service like Yelp
- Design Nearby Friends
- Design Uber
- Design Google Maps
- Design a Local Delivery Service
- Design Chat System/messenger
- Design News Feed
- Design Live Comments
- Design Instagram
- Design YouTube
- Design Google Photos/Photos Storage
- Design Privacy Controls
- Design a Localization Feature
- Design a Ecommerce Website
- Design a Shopping Cart
- Design a Inventory Management System
- Design a Ticketmaster
- Design a Hotel Reservation System
- Design Price Alert Online System
- Design an Online Auction / Bidding System
Where to go deeper. Papers are paired with the note they back up.