An open-source guide
Learn how to design large-scale systems.
Concepts, trade-offs and worked interview solutions, in a form you can actually read. Everything is a trade-off; this is where to learn them.
Interview prep
Pick your path
You do not need to know everything. Match the depth to the time you have.
Short timeline
Aim for breadth. Know what each building block does and when you would reach for it.
- Skim the topics
- Solve a few questions
- Learn the 4-step approach
Medium timeline
Breadth plus some depth. Practise on many questions and read about real systems.
- All of the above
- Work through many solutions
- Read real-world architectures
Long timeline
Go deep in the areas that matter for the roles and companies you are targeting.
- All of the above
- Solve most questions
- Study company engineering blogs
Learn
The map of system design
Ordered the way you meet these problems as a system grows.
Start here
Fundamentals
Performance vs scalability
Slow for one user, or slow only under load? Two different problems.
1 min read05Latency vs throughput
Time to do one thing versus how many things you can do per second.
1 min read06Availability vs consistency
The CAP theorem and why a network partition forces a choice.
1 min read07Consistency patterns
Weak, eventual and strong consistency, and where each one fits.
1 min read08Availability patterns
Fail-over, replication and what the nines really mean.
2 min readNetwork & edge
Domain name system
How names become addresses, and what can go wrong on the way.
1 min read10Content delivery network
Serve content from a location near the user: push vs pull CDNs.
2 min read11Load balancer
Spread requests across servers; layer 4 vs layer 7; horizontal scaling.
3 min read12Reverse proxy
A front door for your servers, and how it differs from a load balancer.
1 min readApplication
Application layer
Separate the web tier from the app tier: microservices and service discovery.
1 min read14Asynchronism
Message queues, task queues and back pressure.
2 min read15Communication
HTTP, TCP, UDP, RPC and REST, and when to reach for each.
7 min read16Security
The essentials: encryption, sanitising input, least privilege.
1 min readData
Labs
Learn by poking at it
Simulations and calculators: size a system, break a cache, partition a database.
Capacity estimator
Turn users and request sizes into QPS, storage, bandwidth and server counts.
1 min readLab 02Consistent hashing
Add and remove nodes on a hash ring and see how few keys have to move.
1 min readLab 03Cache eviction
Replay the same traffic through LRU, LFU, FIFO and random eviction.
1 min readLab 04Load balancing
Compare round robin, least connections, hashing and weighted routing under load.
1 min readLab 05CAP in practice
Partition a three-node store and watch it choose between consistency and availability.
1 min readPractice
Worked solutions
Diagrams, back-of-the-envelope maths and the reasoning behind each choice.

Design Mint.com
Pull in transactions from many banks, categorise spending and send budget alerts.
Intermediate10 min read
Design Pastebin.com (or Bit.ly)
A URL-shortening and text-sharing service: hashing, expiry and read-heavy traffic.
Starter8 min read
Design a key-value cache to save the results of the most recent web server queries
A key-value store that fronts a search engine and evicts with LRU.
Intermediate6 min read
Design Amazon's sales rank by category feature
Compute the best-selling products per category from a stream of orders.
Intermediate7 min read
Design a system that scales to millions of users on AWS
Grow from one box to millions of users, one bottleneck at a time.
Advanced10 min read
Design the data structures for a social network
Shortest path and friend-of-friend queries over a very large social graph.
Intermediate7 min read
Design the Twitter timeline and search
Timeline fan-out, a home feed and search for hundreds of millions of users.
Advanced9 min read
Design a web crawler
Crawl billions of links without repeating work, then rank and serve the results.
Intermediate8 min read