System Design#
System design is the skill of turning a vague idea (“build something like TinyURL”) into a working plan: what it does, how big it must be, which pieces it needs and what you give up with each choice. This course teaches it one concept per chapter. Every chapter has a diagram, an everyday example, worked numbers, code you can run, common mistakes and exercises.
Note
Two ways to learn, side by side. Read the chapters here to learn the ideas. Then open the System Design playground: the problem is on the left and a guided, question-by-question solution is on the right. You decide first, then it shows the correct reasoning and moves you on.
How the course is organised#
Part |
What you learn |
|---|---|
Foundations |
The interview routine, estimating numbers, designing APIs and data |
Core concepts |
Scalability, availability, reliability, failure, latency vs throughput, consistent hashing, CAP |
Networking |
OSI, IP, TCP vs UDP, checksums, DNS, proxies, HTTP and HTTPS, load balancing |
APIs |
REST vs GraphQL, gateways, WebSockets, webhooks, idempotency, rate limiting, API design |
Databases |
ACID, SQL vs NoSQL, indexes, sharding, replication, scaling, database types, Bloom filters, unique IDs |
Caching and CDN |
Caching strategies, eviction, distributed caches, CDNs |
Asynchronous communication |
Queues, publish/subscribe, change data capture |
Distributed systems |
Heartbeats, discovery, consensus, locks, gossip, circuit breakers, disaster recovery, tracing |
Architectural patterns |
Client-server, microservices, serverless, event-driven, peer-to-peer |
Trade-offs |
Eleven head-to-head comparisons you can quote in an interview |
Case studies |
Ten full designs that use everything above |
How each chapter works#
The big idea in plain words, with an everyday example.
A picture of the idea.
How it works, with real numbers and code you can run (the output shown is what the code printed).
Common mistakes and what interviewers look for.
Try it yourself: questions first, answers hidden until you open them.
Tip
Keep a notebook. For each chapter write one line: “I would use X when Y, and it costs Z.” That sentence is exactly what an interviewer wants to hear.
Foundations
Core concepts
Networking
APIs
Databases
- Chapter 29 · ACID transactions
- Chapter 30 · SQL vs NoSQL
- Chapter 31 · Database indexes
- Chapter 32 · Database sharding
- Chapter 33 · Data replication
- Chapter 34 · Database scaling
- Chapter 35 · Types of databases
- Chapter 36 · Bloom filters
- Chapter 37 · Database architectures
- Chapter 38 · Generating unique short IDs
Caching and CDN
Asynchronous communication
Distributed systems
Architectural patterns
System design trade-offs
- Chapter 60 · Top system design trade-offs
- Chapter 61 · Vertical vs horizontal scaling
- Chapter 62 · Concurrency vs parallelism
- Chapter 63 · Long polling vs WebSockets
- Chapter 64 · Batch vs stream processing
- Chapter 65 · Stateful vs stateless architecture
- Chapter 66 · Strong vs eventual consistency
- Chapter 67 · Read-through vs write-through cache
- Chapter 68 · Push vs pull architecture
- Chapter 69 · REST vs RPC
- Chapter 70 · Synchronous vs asynchronous communication
Case studies
- Chapter 71 · Design a URL shortener (TinyURL)
- Chapter 72 · Design autocomplete for a search engine
- Chapter 73 · Design a load balancer
- Chapter 74 · Design a content delivery network (CDN)
- Chapter 75 · Design a parking garage (object-oriented design)
- Chapter 76 · Design a vending machine (state machine)
- Chapter 77 · Design a distributed key-value store
- Chapter 78 · Design a distributed cache
- Chapter 79 · Design an authentication system
- Chapter 80 · Design UPI (Unified Payments Interface)