Summary#
This handbook teaches system design in a fixed order: foundations first, then building blocks, then patterns, then full case studies. Pick one of four learning paths, read each page simple-part-first, and practise by drawing, estimating and explaining trade-offs out loud. Reading alone is not enough; the skill comes from doing designs yourself.
Why It Exists#
System design knowledge is scattered. One blog explains caching, a video covers Kafka, an interview guide lists twenty problems, and none of them connect. Beginners do not know what to read first, and interview candidates memorise answers that fall apart at the first follow-up question.
This handbook puts everything into one path. Each page builds on earlier pages, uses the same layout, and always answers four questions: why a concept exists, when to use it (and when not), how to implement it, and what it costs you.
How It Works#
The handbook is written for three kinds of readers:
- Beginners: students and junior engineers who have built an app but never thought about millions of users. Start at the top and read in order.
- Practitioners: working engineers who design services at their job and want to fill gaps, such as messaging, consistency or multi-region data.
- Interview candidates: new graduates to staff engineers preparing for a system design round.
The content is organised in layers. Each layer depends on the one before it.
Who this handbook is for, in depth#
The three groups above overlap, and most readers belong to more than one. A better way to decide where you fit is to look at what you can already do.
What you should know before starting. The handbook assumes you can:
- Write a small program in any mainstream language and run it.
- Explain what happens, roughly, when a browser loads a web page: a request goes to a server and a response comes back.
- Write a basic SQL query (
SELECT ... WHERE ... ORDER BY), and know that a database stores tables of rows. - Read a simple diagram of boxes and arrows.
You do not need to know networking internals, distributed algorithms, any specific cloud, or how to run Kafka. Those are taught here, from first principles. If any of the four items above is missing, spend a few days on it first, because every page assumes it.
A quick self-assessment. Answer these honestly, without looking anything up:
- Why might adding a second web server not double how many users you can serve?
- What is the difference between a cache and a database replica?
- When would you put a queue between two services instead of having one call the other?
- What does it mean for a system to be "eventually consistent", and when is that acceptable?
- How would you estimate how much storage a photo-sharing app needs per year?
If you could answer none or one, you are a beginner in system design, whatever your years of experience. If you could answer two to four with some confidence, you are a practitioner with gaps. If you answered all five and could also say what can go wrong with each answer, you are ready for staff-level material.
What each reader should take away.
- Beginners should come out able to design a working system for a few million users: load balancers, stateless services, a database with replicas, a cache, a queue, and a CDN, with a rough estimate of each part's size. They should also be able to explain each choice in one sentence.
- Practitioners should be able to compare options under real constraints, for example "Postgres with read replicas or DynamoDB for this access pattern, and what each costs at 50,000 requests per second", and spot failure modes in their own team's designs.
- Interview candidates should be able to run a 45 to 60 minute design conversation: gather requirements, estimate, draw a design that works, and go deep on the two or three hardest parts.
- Staff-level readers should be able to reason about systems they have never seen: identify the one or two decisions that matter most, back them with numbers and known results, and explain how the design evolves as scale, team size and requirements change.
What this handbook is not. It is not a vendor tutorial, a certification guide, or a collection of memorised answers. It does not teach object-oriented design or coding puzzles. It teaches how to reason about services, data and the paths between them.
Learning Paths#
| Path | Who | Read in this order | Time |
|---|---|---|---|
| Beginner | New to system design | Start Here, Foundations, Networking, APIs, Databases, Caching, then 5 easy case studies (URL shortener, rate limiter, notification system, news feed, chat) | ~4-6 weeks |
| Practitioner | Designs systems at work | Scaling Data, Messaging, Architecture, Patterns, Reliability, Key Technologies, then case studies close to your domain | ~4 weeks, part-time |
| Interview in 2 weeks | Interview soon | Days 1-3: Foundations and the interview framework. Days 4-7: Patterns and Key Technologies. Days 8-14: one or two case studies per day, done on paper first | 2 weeks |
| Staff level | Senior engineer aiming higher | Distributed Internals, consistency and multi-region pages, every Deep Dive, landmark papers, then the hardest case studies (payments, stock exchange, maps) | ongoing |
If you are short on time, two pages give the most value per minute: Requirements Gathering and the Interview Framework.
Learning paths, week by week#
The table above gives each path in one line. Here is each path in enough detail to follow day to day. Times assume about 1 to 2 hours a day for part-time paths.
Beginner path (about 6 weeks)
- Week 1: the big picture. What Is System Design?, What Happens When You Type a URL, and Scaling from Zero to Millions. These give you the map that every later page fills in.
- Week 2: foundations. Requirements Gathering, Non-Functional Requirements, Back-of-the-Envelope Estimation, Numbers to Know, Latency, Throughput and Performance and Scaling Up vs Scaling Out.
- Week 3: networking and APIs. Networking Fundamentals, HTTP and HTTPS, DNS, Load Balancing, CDN, API Styles and API Design.
- Week 4: data. Relational Databases, NoSQL Databases, SQL vs NoSQL, Data Modeling, Database Indexing and Replication.
- Week 5: caching and messaging. Caching Fundamentals, Caching Strategies, Message Queues and Pub/Sub and Event Streaming.
- Week 6: first case studies. URL Shortener, Rate Limiter, Notification System, News Feed and Chat System, each designed on paper before reading.
Skip every Deep Dive on this path. Come back for them on a second pass.
Practitioner path (about 4 weeks, part-time)
- Week 1: data at scale. Partitioning and Sharding, Consistent Hashing, Quorums and Leaderless Replication, Distributed Transactions and Consistency Models.
- Week 2: async systems. Delivery Semantics, Event-Driven Architecture, Change Data Capture and Batch vs Stream Processing.
- Week 3: architecture, patterns and reliability. Monolith vs Microservices, the patterns from Scaling Reads to Multi-Step Processes, Resilience Patterns and Observability.
- Week 4: technologies and your domain. The technology pages for tools your team uses or is considering, then the three case studies closest to your work.
On this path, read the Deep Dives on every page in weeks 1 and 2, because those topics are where production incidents come from.
Interview in 2 weeks
| Days | Focus | Pages |
|---|---|---|
| 1 | The process | Interview Framework, Design Process |
| 2 | Requirements and numbers | Requirements Gathering, Back-of-the-Envelope Estimation, Numbers to Know |
| 3 | Core trade-offs | CAP Theorem and PACELC, System Design Trade-offs |
| 4-5 | Patterns | All pattern pages, ending with the Pattern Selection Guide |
| 6-7 | Technologies | Postgres, Redis, Kafka, DynamoDB or Cassandra, Elasticsearch |
| 8-13 | Case studies | One or two per day, each done on paper in 45 minutes before reading |
| 14 | Review | Cheat Sheet and Glossary, Interview Levels and Preparation, and a mock interview |
For days 8 to 13, choose case studies that cover different patterns: one read-heavy (URL shortener or news feed), one real-time (chat or live comments), one with contention (ticket booking or flash sale), one with heavy writes (ad click aggregator or metrics), one geospatial (ride hailing or proximity service), and one with long-running workflows (job scheduler or payments).
Staff-level path (ongoing)
- Read the whole Distributed Internals part, including Time, Clocks and Ordering, Consensus and Landmark Distributed Systems Papers, with every Deep Dive open.
- Read Multi-Region and Global Data, High Availability Design and Disaster Recovery.
- Do the hardest case studies: Payment System, Stock Exchange, Maps and Navigation, Distributed Message Queue and Key-Value Store.
- For each one, write a one-page "how this design evolves" note covering 10 times the scale, a second region, and a team that doubles in size.
Adapting the paths to your background#
The four paths assume a backend-leaning reader. If your background is different, adjust the emphasis as follows. Every role still needs the foundations.
Frontend and mobile engineers. You already know the client side, which many backend engineers do not. Lean on that strength: Client and Mobile Considerations covers offline sync, pagination, push and battery and network limits, all of which interviewers value. Spend extra time on Data Modeling, Caching Fundamentals and Real-time Communication, because those are where client and server design meet. The Chat System, File Sync and Collaborative Editor case studies suit this background.
Data engineers. You probably know batch and stream processing well. Fill the gaps on the serving side: low-latency reads, caching, and API design. Then do the Ad Click Aggregator, Top-K and Metrics Monitoring case studies, where your strength shows. Make sure you can explain Delivery Semantics precisely, because it is where data engineers get the hardest follow-up questions.
Machine-learning engineers. Read the foundations and messaging parts, then Designing GenAI Systems, Vector Databases and the ChatGPT-style assistant case study. The usual gap is serving: model latency budgets, GPU capacity estimation, streaming responses, and caching expensive results.
Site reliability and platform engineers. You know failure better than most readers. The reliability and operations parts will feel familiar, so move quickly through them and spend your time on the data parts (Partitioning and Sharding, Consistency Models) and on product-style case studies, where you need to show you can design features, not only run them.
Engineering managers. Interviews for managers often include a lighter design round focused on trade-offs, risk and team structure. Read System Design Trade-offs, Monolith vs Microservices and Domain-Driven Design, and practise explaining how a design would be split across teams and rolled out safely.
If you have very little time. With only three or four days, do this: day 1 on Interview Framework and Back-of-the-Envelope Estimation; day 2 on the Pattern Selection Guide and the Key Takeaways of each pattern page; days 3 and 4 on two case studies done on paper. It will not fill deep gaps, but it gives you a process, which matters more than any single fact in the first ten minutes of an interview.
If English is not your first language. The pages use short sentences and define jargon on first use, so they should read well. Practise the spoken parts out loud anyway. Explaining a trade-off fluently in an interview is a separate skill from understanding it, and it improves quickly with a few sessions of speaking practice.
How Each Page Is Structured#
Every concept page follows the same layout, so you always know where to look:
- Summary: the idea in two or three sentences.
- Why It Exists: the problem first, then an analogy.
- How It Works: a plain explanation with at least one diagram.
- When to Use It: concrete signals, plus when NOT to use it.
- How to Implement It: steps, a short snippet, and real tools that fit.
- Trade-offs: what you gain, what you pay, common mistakes.
- Real-World Examples and In the Interview: how companies use it and how to talk about it.
- Deep Dive: one or more collapsed sections with internals, algorithms, research results, edge cases and numbers.
- Key Takeaways: sentences you can repeat from memory.
Pages are long on purpose: a concept page is at least 8,000 words and a case study at least 15,000, with no upper limit. Each one aims to be a complete reference for its topic, from the first definition to research-paper-level detail, so an experienced engineer can use it as well as a beginner.
The rule is simple first, depth second: the Summary and the first part of How It Works give you the core idea in a few minutes. Skip the Deep Dives on your first pass and open them on the second. Click any diagram to zoom. Sidebar dots show difficulty: green basic, amber intermediate, red advanced.
Reading a page well, in depth#
Every page uses the same few building blocks. Knowing how to read each one makes a long page fast to navigate.
Front matter cues. Under each title you will find a level (basic, intermediate or advanced), prerequisites, and related pages. Prerequisites are pages whose ideas the current page uses without explaining again. If a page feels hard, the cause is almost always a missing prerequisite, not the page itself. Related pages are where to go next for a neighbouring idea.
Callouts. Three kinds of boxed callouts appear:
- Analogy callouts give an everyday comparison for the core idea. Use them to remember the idea, but never to reason about edge cases. Analogies always break somewhere.
- Interview callouts say when to raise the topic, what a strong answer sounds like, the likely follow-up questions, and the red flag that makes interviewers worry.
- Deep Dive sections are collapsed by default. They hold internals, algorithms, proofs, research results and production lessons. They are optional on a first read and essential for advanced readers.
Diagrams. Five types of diagram appear across the handbook, and each answers a different question:
| Diagram | Question it answers | How to read it |
|---|---|---|
| Flowchart (boxes and arrows) | What are the parts, and how does data flow between them? | Follow arrows from the client inward; labels say what travels on each arrow |
| Sequence diagram | In what order do things happen for one request? | Read top to bottom; each vertical line is a component; dashed arrows are replies |
| Entity-relationship (ER) diagram | How is the data shaped? | Boxes are tables or entities; the line endings show one-to-one, one-to-many or many-to-many |
| State diagram | What states can one thing be in, and what moves it between them? | Start at the filled dot; arrows are labelled with the event that causes each change |
| C4-style flowchart | How does a large system break into containers and components? | Outer boxes are system boundaries; inner boxes are deployable services or stores |
Click any diagram to zoom and pan. For a sequence diagram, a good exercise is to cover the diagram and narrate the steps from memory, then check. For a flowchart, ask of every box: "what happens if this fails?".
Tables. Two tables recur. The "Fits when" table under How to Implement It maps real technologies to situations. Read it as "choose this when...", not as a ranking. The Trade-offs table lists each choice with what it gains, what it costs, and when to pick it. The "Pick when" column is the part to memorise, because it turns knowledge into decisions.
Numbers. Every number on a page is meant to be realistic: a typical latency, a typical throughput, a size that a real system has. When you see a number, ask what it implies. "A Redis instance serves about 100,000 simple operations per second" implies that 1 million reads per second needs a cluster of at least ten instances, or a different design. Training yourself to draw implications from numbers is the most important skill this handbook teaches.
Links. Links point to other pages by slug, and a link to a page that is not written yet is still a promise of where a topic is covered. Follow links only when you need the linked idea to understand the current paragraph. Otherwise, note them and keep reading. Opening every link leads to a hundred half-read tabs and no finished pages.
Two passes. On the first pass, read the Summary, Why It Exists, the plain parts of How It Works, When to Use It, and Key Takeaways. That takes 15 to 25 minutes per page. On the second pass, a few days later, read the "in depth" sections, worked examples and Deep Dives. Spacing the passes is deliberate. The reason is explained in "The learning science behind the method" below.
A worked example: studying one page end to end#
Here is what one full study cycle looks like, using Caching Strategies as the example page. The same cycle works for any concept page.
Day 1, first pass (about 25 minutes). Read the Summary, Why It Exists, the first part of How It Works, When to Use It and Key Takeaways. Skip the "in depth" sections and Deep Dives. Then close the page and write, in your own words:
- The idea in two sentences: "A caching strategy decides who loads data into the cache and who writes changes to it. Cache-aside lets the application load on a miss. Write-through and write-behind route writes through the cache."
- The main diagram from memory, with every arrow labelled.
- One trade-off: "Write-behind makes writes fast but can lose data if the cache fails before it flushes."
Compare with the page. Say you forgot that cache-aside needs invalidation on writes. Write that gap down. It is the most valuable line in your notes.
Day 2, recall (about 10 minutes). Without opening the page, answer: "When would you choose write-through over cache-aside?" Then check. If the answer was weak, reread only that section.
Day 4, second pass (about 60 minutes). Read the "in depth" sections, the worked examples and every Deep Dive. For each new mechanism, write one question you could be asked about it. For example: "Why does deleting a cache key on write beat updating it, under concurrent writers?" These questions become your review deck.
Day 5, apply (about 45 minutes). Open a case study that relies on caching, such as the News Feed, and read only The Problem. Design the caching layer yourself: what is cached, which strategy, what TTL, how big the cache is, and what happens when it is down. Then compare with the case study.
Days 11 and 35, review (5 to 10 minutes each). Answer your review questions from memory. Drop the ones you get right twice in a row, and keep the rest.
In total that is about two and a half hours spread over a month, and the result is knowledge you can use months later. A single three-hour reading session produces familiarity that fades within weeks.
Notes that last. Keep notes short and in your own words, organised by question rather than by page order. A good note answers a question you might be asked ("How do you prevent a cache stampede?") in three to five lines, with one number and one failure mode. Notes copied from the page in its own words are mostly wasted effort, because copying skips the step that builds memory: working out how to say it yourself.
The numbers you will meet on every page#
Many pages assume a small set of numbers. Learn them early, and every estimate on every page becomes easier. Treat them as orders of magnitude, not exact values: hardware changes, but the ratios between levels stay roughly the same for years. Numbers to Know explains each in depth.
| Operation | Typical time | What it means |
|---|---|---|
| Read from main memory | About 100 ns | In-memory lookups are effectively free at request scale |
| Read 1 MB sequentially from memory | About 10 to 50 µs | Scanning memory is fast; scanning disk is not |
| Random read from an NVMe SSD | About 20 to 100 µs | A disk-backed index lookup costs microseconds, not milliseconds |
| Round trip within one data centre | About 0.5 ms | A chain of ten internal calls already costs about 5 ms |
| Redis GET over the network | About 0.5 to 1 ms | A cache hit is dominated by the network, not by Redis |
| Simple indexed query in Postgres | About 1 to 5 ms | Database reads are cheap if indexed and small |
| Round trip between continents | About 100 to 200 ms | Users far from your servers feel every round trip |
| Random read from a spinning disk | About 5 to 10 ms | Why databases moved to SSDs for random access |
Throughput rules of thumb.
- A single stateless web server handles on the order of 1,000 to 10,000 simple requests per second, depending on the work per request.
- A single well-tuned Postgres primary handles on the order of 10,000 simple writes per second, and many more reads with replicas.
- A single Redis instance handles on the order of 100,000 simple operations per second.
- A single Kafka partition handles on the order of 10 MB/s of writes, and a cluster handles gigabytes per second.
Conversion tricks.
- A day has 86,400 seconds. Round it to 100,000 (10^5) for quick maths.
- So 1 million requests per day is about 10 per second on average, and 100 million per day is about 1,000 per second.
- Peak traffic is usually 2 to 10 times the average, depending on how concentrated usage is by time of day.
- Powers of two: 2^10 is about a thousand (KB), 2^20 about a million (MB), 2^30 about a billion (GB), 2^40 about a trillion (TB).
A worked example in 60 seconds. A photo app has 10 million daily active users. Each views 50 photos and uploads 0.2 photos per day, and an average photo is 2 MB.
- Views: 10 million x 50 = 500 million per day, which is about 5,000 per second on average and 15,000 to 25,000 at peak. That is clearly a job for a CDN and a cache, not for the database.
- Uploads: 10 million x 0.2 = 2 million per day, about 20 per second. Writes are low, so a single primary database is fine for metadata.
- Storage: 2 million x 2 MB = 4 TB per day, or about 1.5 PB per year before replication. That decides the storage design: object storage with lifecycle tiers, not a database or local disks.
Three short calculations decided three components. That is what estimation is for: not precision, but choosing the right shape of design. See Back-of-the-Envelope Estimation.
How to study a case study, in depth#
Case studies are where every concept page meets every other. Each one follows the same structure, so once you know the structure you can use it as a checklist for your own designs:
| Section | What it gives you | What to do with it |
|---|---|---|
| The Problem | A short, plain statement of what is being built | Stop here and design it yourself first |
| Clarifying Questions | The questions worth asking, and the answers assumed | Compare with the questions you would have asked |
| Requirements | Functional requirements (what it does) and non-functional ones (how well) | Notice which non-functional requirement drives the design |
| Capacity Estimation | QPS, storage and bandwidth, worked out | Redo the maths with different inputs |
| Core Entities | The main nouns: users, posts, orders, and so on | Check that every API and table maps back to them |
| API Design | The endpoints or messages, with key fields | Ask which calls are hot and which are rare |
| High-Level Design | The first working architecture, drawn | Trace each functional requirement through it |
| Key Flows | Sequence diagrams for the most important requests | Narrate each flow without looking |
| Data Model | Tables or documents, keys and indexes | Ask how each hot query is served by a key or index |
| Deep Dives | The hardest problems, each solved three ways (basic, better, best) | Learn why each step beats the one before |
| Bottlenecks and Failure Modes | What breaks first, and what happens when parts fail | Add your own failure to the list |
| What Interviewers Expect | What a mid-level, senior and staff+ answer covers | Find the level your own attempt reached |
| Deep Dive (collapsed) | Production lessons and research behind the design | Read on the second pass |
| Key Takeaways | The points to remember | Turn them into recall questions |
Basic, better, best. The deep dives deliberately show three solutions to each hard problem. The basic solution works but has a clear flaw. The better solution fixes that flaw and introduces a smaller one. The best solution is what a strong team would ship, along with its remaining costs. The point is not to memorise the best answer. It is to learn the chain of reasoning, because interviewers probe exactly that chain: "why not just use a database lock?" is answered by knowing why the basic solution fails.
A 45-minute walkthrough, using the URL shortener. Here is how to practise one case study in the time an interview gives you:
- Minutes 0 to 5, requirements. Shorten a long URL and redirect from the short one. Optional: custom aliases, expiry, click analytics. Non-functional: redirects must be fast (under about 50 ms at the server), highly available, and short codes must be unique.
- Minutes 5 to 10, estimation. Say 100 million new URLs per month, about 40 writes per second. A read-to-write ratio of 100 to 1 gives about 4,000 redirects per second on average, and perhaps 20,000 at peak. At about 500 bytes per row, five years is 6 billion rows and 3 TB. This tells you that reads dominate and that storage fits a sharded key-value store comfortably.
- Minutes 10 to 20, high-level design. Draw a client, a load balancer, a stateless API service, a database keyed by short code, and a cache in front of it. Walk a write and a redirect through the drawing.
- Minutes 20 to 40, deep dives. Pick the two hardest problems. Here they are generating unique short codes (counter with base-62 encoding, pre-allocated ranges, or hashing with collision checks) and serving hot redirects (cache hit rates, 301 versus 302 redirects and what each does to analytics).
- Minutes 40 to 45, wrap up. Name the bottlenecks, the failure modes (cache down, one database shard down), and what changes at 10 times the scale.
Then read the case study and compare, section by section. Write down what you missed. That list is your study plan for the next week.
How to practise, not just read#
Reading builds recognition. Designing builds skill. The two feel the same while you read, which is why so many people who have "read everything" freeze in a real design session. Practise in these four ways.
1. Draw from memory. After reading a page, close it and draw its main diagram on paper. Label every arrow. Then open the page and compare. The gaps are exactly the parts you did not understand, and they are far more useful than a second read.
2. Estimate out loud. Pick any app on your phone and estimate its daily active users, requests per second, storage per year and bandwidth. It takes five minutes. Do one a day for two weeks and estimation stops being scary. Check your numbers against public figures when they exist, and notice which assumptions were furthest off.
3. Explain each choice in one sentence. For every component in a design, practise this template:
"I chose X because requirement R. It costs us C. I would switch to Y if condition Z changes."
For example: "I chose Cassandra for the message store because we need high write throughput across regions. It costs us flexible queries and strong consistency. I would switch to Postgres if the write rate stayed under about 10,000 per second and we needed joins." A sentence like this shows the reason, the cost and the boundary of the decision, which is exactly what a reviewer or interviewer wants to hear.
4. Grade yourself with a rubric. After each practice design, score yourself from 0 to 2 on each line:
| Area | 0 | 1 | 2 |
|---|---|---|---|
| Requirements | Started drawing immediately | Listed features | Listed features, scale and the key non-functional requirement |
| Estimation | None | Numbers without implications | Numbers that changed a design choice |
| High-level design | Missing parts | Works for the happy path | Works and every requirement is traceable |
| Deep dives | None | Named the hard problem | Compared at least two solutions with trade-offs |
| Failure modes | None | Mentioned "add redundancy" | Named specific failures and the behaviour during each |
| Communication | Silent drawing | Explained what | Explained why, and checked in with the listener |
A total of 9 or more is a solid senior-level answer. Track your score across practice sessions. It should rise steadily, and the line where you score lowest tells you which pages to reread.
Practise with someone. A mock interview with a peer is worth several solo sessions, because another person asks the follow-up questions you would never ask yourself. Take turns: one person designs, the other uses the case study's "What Interviewers Expect" section as the interviewer's guide.
The learning science behind the method#
The study methods above are not just habits. Each one rests on well-replicated findings about how people learn, and knowing why they work makes it easier to keep using them when they feel slow.
Retrieval beats rereading (the testing effect). Henry Roediger and Jeffrey Karpicke, in "Test-Enhanced Learning: Taking Memory Tests Improves Long-Term Retention" (Psychological Science, 2006), had students either reread a passage several times or read it once and then practise recalling it. On a test a few minutes later, the rereaders did slightly better. On tests days later, the recall group did clearly better, even though they had spent less time with the text. Rereading feels productive because the text becomes familiar, but familiarity is not the same as being able to produce the idea on demand. This is why the handbook asks you to draw diagrams from memory and turn takeaways into questions.
Spacing beats cramming. Hermann Ebbinghaus first described the forgetting curve in "Über das Gedächtnis" (1885): memory fades quickly after learning, and each later review slows the fading. A large review by Nicholas Cepeda and colleagues, "Distributed Practice in Verbal Recall Tasks" (Psychological Bulletin, 2006), confirmed across hundreds of studies that spreading study sessions out beats massing them together, for the same total time. A practical schedule: review a page the next day, then after about three days, then after about a week, then after about a month. Each review is a quick recall attempt (draw the diagram, list the trade-offs), not a full reread.
Interleaving beats blocking. Practising one type of problem many times in a row (blocking) feels smooth. Mixing different types (interleaving) feels harder and works better, because you have to recognise which method applies before you apply it. Doug Rohrer and Kelli Taylor showed this for maths problems in "The Shuffling of Mathematics Problems Improves Learning" (Instructional Science, 2007). In system design, recognising which pattern fits is most of the skill. So in the case-study phase, avoid doing three feed-style problems in a row. Alternate a read-heavy problem with a contention problem and a real-time problem.
Explaining builds understanding (self-explanation). Michelene Chi and colleagues, in "Self-Explanations: How Students Study and Use Examples in Learning to Solve Problems" (Cognitive Science, 1989), found that students who explained each step of a worked example to themselves learned much more from it than students who just read it. This is why the "I chose X because R" sentence matters. Saying the reason out loud forces you to find out whether you have one.
Deliberate practice builds expertise. K. Anders Ericsson, Ralf Krampe and Clemens Tesch-Römer, in "The Role of Deliberate Practice in the Acquisition of Expert Performance" (Psychological Review, 1993), found that experts are distinguished less by total hours than by hours of focused practice on their weak points, with feedback. Designing systems you already find easy does not make you better. The rubric exists to tell you where your weak points are, so that practice time goes there.
Experts see patterns (chunking). William Chase and Herbert Simon, in "Perception in Chess" (Cognitive Psychology, 1973), showed chess masters a board position for a few seconds. Masters could reconstruct real game positions far better than novices, but with random piece placements their advantage largely disappeared. Their skill was not a better memory. It was a large library of meaningful patterns (chunks) that let them see a board as a few familiar structures instead of 25 separate pieces. Senior system designers work the same way. They see "this is a fan-out problem with a hot-key risk" instead of a blank page. Each pattern page and case study adds chunks to that library. The Deep Dive below describes how to build it on purpose.
| Finding | What it means for you | Where the handbook supports it |
|---|---|---|
| Testing effect | Recall, don't reread | Draw from memory; Key Takeaways as questions |
| Spacing | Review on a growing schedule | Two-pass reading, review after 1, 3, 7 and 30 days |
| Interleaving | Mix problem types | Varied case-study order in the 2-week plan |
| Self-explanation | Say why, not what | The "I chose X because R" sentence |
| Deliberate practice | Work on weak points, with feedback | The self-grading rubric |
| Chunking | Build a pattern library | Pattern pages and the Pattern Selection Guide |
Using the handbook at work#
The handbook is written for real design work as much as for interviews. Three work activities map onto it directly.
Writing a design document. Most engineering organisations that build large systems use a written design document before major work starts. Google is well known for this practice, and Amazon for its long-form written narratives in place of slide decks. A good design doc has the same skeleton as a case study: context and problem, goals and non-goals, requirements with numbers, the proposed design with diagrams, alternatives considered with trade-offs, failure modes, and a rollout plan. Use a case study as a template. Use the concept pages behind each component to fill in "alternatives considered", because the trade-off tables are exactly that section, already written.
A useful habit is to write the non-goals explicitly. "This design does not support multi-region writes in the first version" is a decision, and writing it down prevents months of argument later.
Recording decisions. An architecture decision record (ADR) is a short document that captures one decision: its context, the decision, its status, and its consequences. Michael Nygard proposed the format in a 2011 blog post, "Documenting Architecture Decisions". ADRs are kept next to the code, numbered, and never edited after acceptance. A later decision that reverses one is written as a new ADR that supersedes it. This keeps the history of why the system looks the way it does.
# docs/adr/0007-use-outbox-for-order-events.md (shown as fields)
title: Use the transactional outbox for order events
status: accepted
context: >
Order service writes to Postgres and must publish OrderPlaced to Kafka.
In failover tests, dual writes lost events when the broker was down.
decision: >
Write events to an outbox table in the same transaction.
Debezium relays the outbox to Kafka.
consequences: >
At-least-once delivery, so consumers dedupe by event ID.
About 100 to 500 ms extra publish latency. One more component to run.The trade-off tables in this handbook map one-to-one onto the "consequences" field. A decision with no listed consequences was probably not thought through.
Reviewing someone else's design. When reviewing, work through the page structure as a checklist rather than reacting to whatever catches your eye:
- Are the requirements and numbers written down, and do they justify the design? A sharded cluster for 50 writes per second is as wrong as a single database for 500,000.
- For each component, is it clear why it was chosen over the obvious alternative?
- For each arrow, what happens if the call is slow, fails, or is retried? Is the operation idempotent?
- Where is the data's single source of truth, and how do copies (caches, replicas, search indexes) stay in sync?
- What breaks first at 10 times the load, and how would anyone notice? Is there a metric and an alert for it?
- How does the change roll out and, more importantly, roll back?
Asking these six questions politely and consistently catches most serious design flaws before they reach production. Design Process covers the end-to-end method in more depth.
What interviewers look for at each level#
Every case study ends with a "What Interviewers Expect" section that breaks expectations down by level. The pattern is the same across problems, so it helps to know it before you start.
The four signals. Most companies grade a system design interview on roughly four signals, under different names:
- Problem navigation. Did the candidate turn a vague prompt into clear requirements, and focus on the parts that matter?
- Solution design. Does the design work end to end, and does it fit the requirements and numbers?
- Technical depth. Can the candidate go deep on the hard parts, with real mechanisms rather than buzzwords?
- Communication. Did the candidate explain their reasoning, take hints well, and keep the interviewer engaged?
How the bar shifts by level.
| Level | Typical expectation | Who drives | Depth expected |
|---|---|---|---|
| Mid-level (about 2 to 4 years) | A working design that covers the functional requirements, with reasonable component choices | The interviewer guides much of the conversation | One deep dive, with help |
| Senior (about 5 to 8 years) | A working design plus clear trade-offs, sensible numbers, and two or three solid deep dives | The candidate drives, the interviewer probes | Two or three deep dives, unprompted |
| Staff and above | All of senior, plus judgement: which problems matter most, what to leave out, how the design evolves, operational and organisational concerns | The candidate drives and sets priorities | Deep on the decisive problem, with failure modes and evolution |
The jump from mid-level to senior is mostly about driving: you identify the hard parts yourself instead of waiting to be asked. The jump from senior to staff is mostly about judgement: you can say which two of ten possible deep dives actually decide whether the system succeeds, and defend that choice.
What a strong answer sounds like. Compare two answers to "how do you prevent double booking of a seat?":
- Weaker: "I'd use a lock." This names a tool but gives no mechanism, scope or failure behaviour.
- Stronger: "Each seat row has a status and a version. Reserving is a conditional update: set status to held where status is available. Only one request can win, and the loser gets a clear error. Holds expire after 10 minutes through a TTL, so abandoned checkouts free the seat. If we need to handle a flash sale with 100,000 users on one event, I'd put a virtual waiting room in front, so the database sees a controlled rate."
The stronger answer has a mechanism, a guarantee, a failure case and a scaling plan, in four sentences.
Common red flags. These appear across almost every case study's interview callouts:
- Drawing before asking any questions.
- Naming technologies without saying why, or what they cost.
- Ignoring the numbers, for example sharding a system that fits on one machine.
- Hand-waving the hard part ("we'll just use a distributed transaction").
- Never mentioning failure: what happens when a component is slow or down.
- Not listening: missing hints, or defending a choice after the interviewer has shown its flaw.
Interview Framework turns this into a minute-by-minute plan, and Interview Levels and Preparation covers each level in more detail.
Check yourself after each part#
After finishing each part, try to answer its questions without looking. If you cannot answer one, the linked page is the one to revisit. This is retrieval practice built into the handbook's structure.
| Part | You should be able to answer |
|---|---|
| Start Here | What are the main building blocks of a web application, and what triggers each scaling step from one server to millions of users? |
| Foundations | Turn "design a photo app" into requirements and estimates. Explain CAP and PACELC with one CP and one AP example. Convert 99.99% availability into minutes of downtime per year. |
| Networking | Walk through a request from DNS lookup to response. Compare layer 4 and layer 7 load balancing. Choose between polling, server-sent events and WebSockets for a feature. |
| APIs | Compare REST, gRPC and GraphQL for a given client. Design an idempotent payment endpoint. Explain what an API gateway does and does not do. |
| Databases | Choose SQL or NoSQL for an access pattern and defend it. Explain how a B-tree and an LSM tree differ, and which workloads each suits. Name an isolation anomaly and how to prevent it. |
| Scaling Data | Pick a shard key and name its hot-spot risk. Explain how consistent hashing limits data movement. Compare leader-based and leaderless replication. |
| Caching | Compare cache-aside, write-through and write-behind. Explain a cache stampede and two fixes. Choose an eviction policy. |
| Messaging | Explain at-least-once versus exactly-once and where each holds. Choose between a queue and a log. Explain the outbox pattern and change data capture. |
| Distributed Internals | Explain why clocks cannot order events and what logical clocks do instead. Describe how Raft elects a leader. Choose a unique ID scheme. |
| Architecture and Patterns | Decide when microservices are worth their cost. Pick the right pattern for read scaling, write scaling, contention, real-time updates and long-running tasks. |
| Reliability, Security, Operations | Design retries with backoff and a circuit breaker. Choose a rate-limiting algorithm. Define SLOs and alerts for a service. |
| Technologies | Say when Postgres, Redis, Kafka, Cassandra, DynamoDB and Elasticsearch each fit, and when each does not. |
| Playbooks and Case Studies | Run a full 45-minute design from a one-line prompt, and grade yourself with the rubric. |
A good sign of mastery is being able to answer each question at two levels: a one-minute version for a beginner, and a five-minute version with mechanisms, numbers and failure modes.
Words you will meet in the first week#
Each page defines its jargon on first use, but a handful of terms appear on almost every page. Knowing them before you start makes the early pages read much faster. The Cheat Sheet and Glossary has the full list.
| Term | Plain meaning | Example |
|---|---|---|
| QPS / RPS | Queries or requests per second: how much traffic a component receives | "The redirect service handles 20,000 RPS at peak" |
| Latency | Time for one request to complete | "Median 5 ms, but the slowest 1% take 80 ms" |
| p50, p99 | Percentiles: p99 is the latency that 99% of requests beat | "p99 under 200 ms" is a common target |
| Throughput | Work completed per unit time | "The pipeline processes 50 MB/s" |
| SLO | Service level objective: a target for a measured quantity | "99.9% of requests succeed each month" |
| Replica | A copy of data on another machine, for reads or for failover | "Two read replicas behind the primary" |
| Shard / partition | One slice of a dataset, stored on its own machines | "Users are split into 64 shards by user ID" |
| Idempotent | Safe to repeat: doing it twice has the same effect as once | "Retrying the payment with the same key does not charge twice" |
| TTL | Time to live: how long a cached or stored item lasts before expiring | "Cache entries expire after 5 minutes" |
| Fan-out | One event causing many deliveries or writes | "A post by a user with 10 million followers fans out to 10 million feeds" |
| Hot key / hot spot | One key or partition receiving far more traffic than the rest | "A celebrity's profile overloads one cache node" |
| Back-pressure | A slow consumer signalling producers to slow down | "The queue rejects new jobs when it is full" |
| Single point of failure | A component whose failure takes the whole system down | "One database with no replica" |
| Eventual consistency | Copies of data may differ briefly but converge if writes stop | "A new like may take a second to appear everywhere" |
How to trust, and check, what you read#
The handbook aims to be accurate, but no reference replaces measurement. Three habits keep you safe.
Treat numbers as starting points. A number such as "a Postgres primary handles about 10,000 simple writes per second" is a typical figure for modern hardware and small rows. Your workload may differ by ten times in either direction, depending on row size, indexes, transaction shape and disk. Use the handbook's numbers to choose a design in an interview or an early design doc. Before committing real money, benchmark with your own data, for example with pgbench for Postgres, redis-benchmark for Redis or kafka-producer-perf-test for Kafka.
Check claims about companies against their own sources. When a page says a company uses a technique, it is because the company has described it publicly, usually in an engineering blog post, a conference talk or a paper. Systems change over time, so a design described in 2015 may have been replaced since. When it matters, find the company's own description and its date.
Prefer mechanisms to rules. A rule like "use NoSQL for scale" ages badly and has many exceptions. A mechanism like "a single-leader database is limited by its leader's write capacity, so very high write rates need partitioning, which some NoSQL stores do automatically" stays true and tells you when the rule fails. The pages try to teach mechanisms for exactly this reason. When you find a rule, look for the mechanism behind it.
The last week and the day itself#
How you spend the final days before an interview matters almost as much as the weeks before them.
The last week. Stop opening new topics. Learning a new technology three days before an interview mostly adds anxiety and half-formed ideas that are risky to mention. Instead, do one timed case study a day, review your notes and review questions, and reread the Key Takeaways of the pattern pages. Do at least one mock interview with another person, ideally someone who has interviewed candidates before.
The day before. Do a light review only: skim the cheat sheet, the numbers table above and your own list of mistakes from practice. Prepare your setup. For a remote interview, test the drawing tool the company uses (often Excalidraw or a shared whiteboard), your camera and your microphone. Sleep matters more than one more case study, because tired people skip requirements and forget failure modes, which are the two most common ways to lose points.
In the first five minutes. Slow down on purpose. Restate the problem in your own words, ask about scale and the most important user actions, and write the requirements where the interviewer can see them. This is the single highest-value habit in the whole handbook. It prevents designing the wrong system, and it shows the interviewer how you work before you have drawn a single box.
When you get stuck. Say what you are thinking: "I am deciding between a queue and a direct call here. The queue helps with spikes but adds delay." Interviewers can only give credit for reasoning they can hear, and they often give a useful hint once they know where you are. Silence earns nothing.
Afterwards. Within an hour, write down the problem, what you designed, the follow-up questions you were asked, and where you felt unsure. Whatever the outcome, that list tells you exactly which pages to reread, and it is the most honest feedback you will get.
When to Use It#
- You are starting system design from zero and want a clear order.
- You have an interview in days or weeks and need a plan, not a reading list.
- You are designing a real service and need to compare options (which database, which queue, which consistency model).
When NOT to Use It#
- To learn one product's API in detail. Use its documentation; this handbook tells you when to pick it.
- For low-level design (classes, code patterns). This handbook covers services, data and how they talk.
- As a replacement for building things.
How to Implement It#
- Read the page once quickly. Skip the Deep Dive. Write the Summary in your own words.
- Redraw the main diagram from memory. If you cannot, reread "How It Works".
- Do the numbers. Use Back-of-the-Envelope Estimation to size the problem: requests per second, storage per year, bandwidth.
- Explain one trade-off out loud. For example: "Reads outnumber writes 100 to 1, so I accept data up to a few seconds stale." Talking shows which parts you only half understand.
- Study a case study actively. Read only "The Problem" section. Close the page and design it yourself for 30-45 minutes. Then compare section by section with the written solution.
- Review weekly. Reread the Key Takeaways of pages you finished. The Cheat Sheet and Glossary is built for this.
Each case study follows the same steps you would use in a real design review or interview:
| Tool | Fits when |
|---|---|
| Paper, a whiteboard, or Excalidraw | Drawing designs fast, as in an interview |
| A timer (45 minutes) | Practising case studies under interview pressure |
| A study partner or mock interviewer | Practising out-loud explanations and follow-up questions |
Trade-offs#
| Approach | Pros | Cons | Pick when |
|---|---|---|---|
| Read everything in order | No gaps; each page builds on the last | Slow; ~140 pages | You have weeks and want real depth |
| Follow a short path | Fast, focused | Gaps show up in follow-up questions | Interview soon |
| Jump to case studies | Feels productive quickly | You copy answers without understanding why | Only after the foundations |
| Read on screen only | Fast, searchable, diagrams zoom | Easy to confuse recognition with understanding | Combined with drawing from memory |
| Study alone | Flexible schedule | No one asks the follow-ups you would not ask yourself | Early on, before mocks |
| Mock interviews with peers | Realistic pressure and follow-ups | Needs scheduling; feedback quality varies | In the last two to three weeks before an interview |
| Spaced review of Key Takeaways | Keeps earlier parts fresh at low cost | Feels slow and repetitive | Always, about 15 minutes a day |
Common Pitfalls#
- Memorising one "correct" design. Interviewers change one requirement and the memorised answer breaks. Learn the reasons instead.
- Skipping estimation. Numbers decide whether you need a cache, a shard or a queue at all.
- Naming technologies without trade-offs. Saying "use Kafka" without saying why (and what it costs) is a common red flag.
- Rereading instead of recalling. Rereading feels productive, but recalling (drawing, explaining, answering the self-check) is what builds memory that lasts.
- Reading Deep Dives on the first pass. Depth without the basics in place is hard to hold onto. Get the core idea first.
- Practising only the problems you like. Deliberate practice means working on your weakest rubric line, not your strongest.
- Studying only for interviews. The same skills are tested every time you write or review a design doc. Practise on your real work too.
- Never timing yourself. A design that takes two hours on paper is not ready for a 45-minute interview.
Real-World Examples#
Typical scenario: an engineer is asked to add notifications to a product. They read Message Queues and Delivery Semantics, then the notification system case study. They then write a one-page design with requirements, estimates and two options compared side by side.
Typical scenario: a candidate with an interview in two weeks follows the 2-week path and designs one case study per day on paper before reading the solution.
Typical scenario: a backend engineer preparing for a senior interview does the part self-checks and finds gaps in messaging and contention. They spend a week on those parts, then do one case study a day, alternating problem types. They track their rubric score from 6 to 10 over two weeks.
Typical scenario: a tech lead is asked to review a design for a new ledger service. They use the six review questions from "Using the handbook at work" and find that the design has no idempotency on its payment-capture call and no plan for the database primary failing. Both are fixed before any code is written.
Typical scenario: a team adopts architecture decision records. Each ADR's consequences section is checked against the relevant trade-off table in this handbook, so costs are written down when the decision is made, not discovered in an incident a year later.
In the Interview#
Frequently asked questions#
Do I need to read every page? No. A short path is enough for an interview. But a design question usually touches six to ten pages at once, so gaps show up quickly in follow-up questions. If you have the time, the full order gives you the fewest surprises.
The pages are long. How do I avoid getting lost? Use the table of contents on the right to jump between sections, and stop after Key Takeaways on a first pass. The "in depth" sections and Deep Dives are meant for later passes. A page you understand at its first level is worth more than a page you skimmed to the end.
I already work with these technologies. Is the basic material worth reading? Read the Summary and Key Takeaways of the basic pages in a few minutes each, and do the part self-check above. If you can answer every question, skip to the next part. Experienced engineers often discover that they know their own stack deeply but cannot compare it with alternatives, and comparison is what design reviews and interviews ask for.
Should I memorise the case-study solutions? No. Memorise the reasons, not the boxes. An interviewer who sees a memorised design will change one requirement, such as "now the feed must be strictly ordered" or "now it must work in three regions", and a memorised answer has nothing to say. A design you can rebuild from requirements adapts.
How do I know when I am ready for an interview? When you can do three unfamiliar case studies in 45 minutes each, scoring 9 or more on the rubric, and handle "what if this fails?" for every component without long pauses.
Which technologies should I know well? One relational database (Postgres is the most common choice in interviews), one cache (Redis), one log or queue (Kafka), one wide-column or key-value store (Cassandra or DynamoDB), and one search engine (Elasticsearch). Knowing these five well, including their limits, covers most designs. The technology pages explain each in depth.
What if two pages seem to disagree? Usually they are answering under different requirements. For example, one page recommends strong consistency for bookings and another accepts eventual consistency for feeds. The "Pick when" column of each trade-off table says which condition applies. Learning to spot that condition is the skill.
Deep Dive: Studying for staff-level depthShow
At senior and staff level, interviewers care less about whether you know a component and more about judgement. Can you see which one or two problems matter most? Can you weigh options with numbers? Do you know how the system fails and how it changes over the years?
To build that judgement:
- Read for failure modes. Ask what happens during a network partition, a slow disk, a hot key or a bad deploy.
- Connect pages. Replication, consistency models and quorums are one topic seen from three sides. Try explaining how they fit together without notes.
- Read primary sources. The Landmark Papers page summarises the papers behind Dynamo, Bigtable, Spanner and Raft. Reading even one end to end changes how you reason about trade-offs.
- Practise evolution. Redesign a finished case study for 100x scale or a second region. Write down what breaks first.
Self-check: if you can say why a design is right and when it becomes wrong, you understand it at staff level.
Deep Dive: Building a pattern library on purposeShow
The chunking research described above suggests that expertise in design is largely a library of recognised situations, each linked to a small set of good responses. You can build that library deliberately instead of waiting for years of experience to build it for you.
Index problems by forces, not by product. "Chat app", "food delivery" and "stock exchange" are product names. Underneath, each is a combination of a few recurring forces: many readers of the same data, many writers to one record, data that must reach users in real time, work that takes minutes or hours, and so on. When you finish a case study, write down the forces it contained, not the product. After ten case studies, you will see the same forces return in new combinations.
| Force you notice in a problem | Patterns to consider | Where to read |
|---|---|---|
| Reads far outnumber writes | Caching, read replicas, CDN, denormalised read models | Scaling Reads |
| Very high write rate | Partitioning, batching, append-only logs, LSM-based stores | Scaling Writes |
| Many users compete for one item | Conditional updates, locks with leases, queues per item, waiting rooms | Dealing with Contention |
| Users must see changes in seconds | WebSockets or server-sent events, pub/sub fan-out | Real-time Updates |
| Work takes longer than a request | Job queues, workers, status polling or callbacks | Long-Running Tasks |
| A business process spans services | Sagas, workflow engines, outbox | Multi-Step Processes |
| Large files | Presigned uploads, chunking, object storage, CDN | Handling Large Blobs |
| Search by text or location | Inverted indexes, geospatial indexes | Geospatial Indexing |
| Counting or ranking at huge scale | Stream aggregation, approximate data structures | Probabilistic Data Structures |
Record the failure, not just the fix. For each pattern, write the one-line failure it prevents ("two users booking the last seat") and the one-line failure it introduces ("held seats that never get released"). Patterns are always trades, and remembering both sides is what lets you choose under new constraints.
Learn the boundary numbers. Each pattern has a point below which it is overkill. A cache for 50 reads per second adds a failure mode and saves nothing. Sharding for 2,000 writes per second adds months of work that one Postgres primary did not need. Writing down the rough boundary for each pattern ("needed above about X") turns a pattern library into a decision procedure.
Test the library on new problems. Once a month, take a problem the handbook does not cover (a parking-lot booking system, a sports live-score app, a document-signing service) and try to design it using only the forces table. If the forces table gives you a good first design in ten minutes, the library is working. Where it fails, you have found a gap, and the Pattern Selection Guide and Real-World Architecture Lessons are the places to fill it.
Why this matters beyond interviews. Teams that share a vocabulary of patterns review designs faster, because "this is a contention problem, we use a conditional write plus a hold with a TTL" is one sentence everyone understands. Christopher Alexander's "A Pattern Language" (1977), written about buildings and towns, is the origin of this idea. The software patterns movement, including "Design Patterns" by Gamma, Helm, Johnson and Vlissides (1994), borrowed it directly. System design patterns are the same idea, one level up: patterns for services and data rather than for classes.
Key Takeaways#
- Choose one learning path and follow it in order, because each page depends on the ones before it.
- Read every page simple-part-first, then return to the Deep Dive once the basics feel natural.
- Study case studies actively: design first on paper, then compare with the written solution.
- Practise by drawing, estimating and explaining trade-offs out loud, because that is what real design reviews and interviews test.
- Learn why each design choice is made, so you can adapt when requirements change.
- Use the self-assessment to pick a path, and the part self-checks to decide when to move on.
- Learn the core numbers early: they turn every estimate into a design decision.
- Practise by recalling, spacing and interleaving, and grade yourself with the rubric; these methods are backed by decades of learning research.
- Build a pattern library indexed by forces, not by product names, and note both the failure each pattern prevents and the one it introduces.
- Use the same structure at work: design docs, ADRs and design reviews follow the shape of a case study.