The System Design Framework: How to Run a Design Discussion End to End
The prompt is one line: “Design a system that lets users like a post and see the like count.” The candidate nods, draws a box labelled “API”, a box labelled “Postgres”, and starts talking about sharding. Twenty minutes later the interviewer asks how many likes per second the system takes at peak. The candidate has no idea. The sharding scheme was designed for a load nobody measured, and the follow-up questions (“what happens when a celebrity post gets 2 million likes in an hour?”) land on a design with no room to absorb them.
Now picture a second candidate with the same prompt. In the first five minutes they establish that there are 300 million daily users, that each likes about 10 posts a day, that counts may lag by a few seconds but a user must always see their own like, and that the read to write ratio is roughly 50 to 1. They compute 35,000 likes per second on average and about 100,000 at peak. Every decision after that has a number to stand on.
The difference is not knowledge of more technologies. It is method. This article gives you the method, and it doubles as the map for the rest of this course.
What the framework is
A system design framework is a fixed sequence of questions you work through so that every design decision is anchored to a requirement or a number. It is the same sequence whether you are in a 45 minute interview, writing a design doc, or reviewing a colleague’s proposal:
- Clarify functional requirements (what the system does).
- Clarify non-functional requirements (how well it must do it: scale, latency, availability, consistency, durability, cost).
- Estimate the load (QPS, storage, bandwidth).
- Define the API.
- Define the data model.
- Draw the high-level design.
- Deep dive on the two or three hardest parts.
- Name bottlenecks, failure modes and trade-offs.
- Wrap up: summarise, state what you would do next.
The point of the order is dependency. You cannot size a database before you know the write rate, and you cannot know the write rate before you know what the system does and for how many people.
How the framework works, step by step
flowchart TD A["1. Functional requirements<br/>what must it do"] --> B["2. Non-functional requirements<br/>scale, latency, availability, consistency"] B --> C["3. Estimates<br/>QPS, peak, storage, bandwidth"] C --> D["4. API<br/>endpoints and payloads"] D --> E["5. Data model<br/>entities, keys, access patterns"] E --> F["6. High-level design<br/>boxes and arrows that serve the API"] F --> G["7. Deep dives<br/>the 2 or 3 hardest parts"] G --> H["8. Bottlenecks and trade-offs"] H --> I["9. Wrap-up"] G -.->|"new constraint found"| B style A fill:#EEEDFE,stroke:#534AB7,color:#3C3489 style B fill:#EEEDFE,stroke:#534AB7,color:#3C3489 style C fill:#E1F5EE,stroke:#0F6E56,color:#085041 style D fill:#F1EFE8,stroke:#888780,color:#444441 style E fill:#F1EFE8,stroke:#888780,color:#444441 style F fill:#E1F5EE,stroke:#0F6E56,color:#085041 style G fill:#FAEEDA,stroke:#854F0B,color:#633806 style H fill:#FAEEDA,stroke:#854F0B,color:#633806 style I fill:#E1F5EE,stroke:#0F6E56,color:#085041
1. Functional requirements
List the three to five things the system must do, phrased as user actions: “a user can like a post”, “a user can see the like count on a post”, “a user can see whether they already liked it”. Then say out loud what you are leaving out: “I will skip notifications and the list of who liked a post unless you want them.” Scoping is a skill being tested. An unbounded design cannot be finished in 45 minutes.
2. Non-functional requirements
This is where most of the design is actually decided. Ask about, or propose and confirm:
- Scale: daily active users, actions per user, data size per item, growth.
- Latency: target for the main read and write paths, usually as a p99. The difference between mean and p99 matters, see latency vs throughput.
- Availability: how many nines, and which paths must stay up when others degrade. The math is in availability and fault tolerance.
- Consistency: can readers see stale data, and for how long? Must users read their own writes? The vocabulary for this is in consistency models.
- Durability: can any write ever be lost? Likes can tolerate a tiny loss; payments cannot.
- Read to write ratio: decides whether you optimise for reads (caches, denormalised views) or writes (append logs, batching).
A useful trick: propose numbers instead of asking open questions. “I will assume 300 million DAU, a p99 under 200 ms for reads, and that counts may be a few seconds stale. Does that match what you have in mind?” It is faster and shows judgement.
3. Estimates
Turn the requirements into numbers: average QPS, peak QPS, storage per year, bandwidth. Two minutes of arithmetic, rounded aggressively. The technique gets its own article, back-of-envelope estimation. The goal is not precision. It is knowing whether you are designing for 100 requests per second (one Postgres box, done) or 1 million (partitioning, caching and asynchronous writes are mandatory).
4. API
Write the handful of endpoints that serve the functional requirements, with the important fields. For the likes example:
POST /v1/posts/{postId}/likes -> 204 (idempotent per user)
DELETE /v1/posts/{postId}/likes -> 204
GET /v1/posts/{postId}/likes/summary -> { count, likedByMe }
The API forces decisions early: is liking idempotent (it should be, so retries are safe, see idempotency), what does the read return, how do you paginate lists. Protocol choice (REST, gRPC, WebSockets) is a detail you can state in one sentence; it is covered in REST vs GraphQL vs gRPC.
5. Data model
Name the entities, their keys and, most importantly, the access patterns. “Likes keyed by (post_id, user_id) so a like is a single idempotent upsert; a separate counter per post_id so reads do not scan.” The access pattern decides the store, not the other way around. Picking a database before you know how you will query it is the most common reason a design falls apart in the deep dive. The full treatment is in data modeling and denormalization.
6. High-level design
Now draw boxes: clients, edge or CDN, load balancer, stateless services, stores, caches, queues. Walk one request through the diagram for each API endpoint. If a box does not serve an endpoint, delete it. Keep it to 6 to 10 boxes. The diagram should make the read path and write path visibly different if they have different requirements.
7. Deep dives
Pick the two or three parts where the design is hardest and go deep. Usually the interviewer will steer you; if not, choose based on your estimates. For likes, the deep dives are obvious: the hot counter on a viral post, and how the count stays correct when writes are buffered. A deep dive covers the mechanism, the numbers, the failure modes and the alternatives you rejected.
8. Bottlenecks and trade-offs
For each major choice, say what you gained, what you paid, and when the choice would flip. “Buffering like increments in a queue lets us absorb 100,000 writes per second on a few hundred partitions, but counts lag by up to a few seconds and a consumer bug could double count, so the consumer must be idempotent. If the product needed exact real-time counts we would pay for it with sharded synchronous counters.”
Also name the single points of failure and what happens when each dependency is slow or down.
9. Wrap-up
In the last few minutes, summarise the design in four or five sentences, restate how it meets each non-functional requirement, and list what you would do with more time (monitoring and SLOs, multi-region, abuse protection). Ending crisply matters more than adding one more box.
Time budgets for 45 and 60 minute rounds
A 45 minute interview usually leaves about 40 minutes of design after introductions. A 60 minute round leaves about 52 to 55. The budgets below are targets, not rules; what matters is that you reach the deep dives with real time left.
| Phase | 45 minute round | 60 minute round |
|---|---|---|
| Requirements, functional and non-functional | 5 min | 7 min |
| Estimates | 3 min | 5 min |
| API and data model | 5 min | 8 min |
| High-level design | 10 min | 12 min |
| Deep dives, bottlenecks, trade-offs | 13 min | 18 min |
| Wrap-up and your questions | 4 min | 5 min |
pie showData title "45 minute round, minutes per phase" "Requirements" : 5 "Estimates" : 3 "API and data model" : 5 "High-level design" : 10 "Deep dives and trade-offs" : 13 "Wrap-up" : 4
Notice the shape: about a third of the time goes to deep dives. Candidates who spend 25 minutes on the high-level diagram never get there, and the deep dive is where seniority is judged.
What senior and staff signals look like
Interviewers are not grading the final diagram. They are grading how you got there. The bar rises with level.
| Signal | Mid-level | Senior | Staff |
|---|---|---|---|
| Requirements | Lists features | Pins non-functional numbers and gets agreement | Questions the requirement itself, finds the one that dominates cost or risk |
| Estimates | Skips or guesses | Computes QPS, storage and peak, uses them | Uses estimates to rule options in or out on the spot |
| Design | Correct boxes | Boxes justified by access patterns | Several viable designs compared, picks one with explicit criteria |
| Deep dives | Describes components | Explains mechanisms, failure modes, numbers | Covers operability: rollout, migration, observability, cost, team ownership |
| Trade-offs | “It depends” | Names gain, cost and when it flips | Ties trade-offs to business impact and evolution over years |
| Driving | Waits to be asked | Drives the agenda, checks in | Drives, and adapts the agenda when the interviewer signals interest |
A staff signal that is easy to miss: saying what you would not build. “We do not need a separate counter service at this scale; a column with batched increments is enough for the first two years” shows you weigh complexity as a cost.
Where it breaks: common failure patterns
Jumping to components. Naming Kafka, Redis and Cassandra in the first two minutes, before any requirement justifies them. Each named technology invites a question you have not prepared the context to answer.
Requirements without numbers. “It needs to be scalable and highly available” is not a requirement. “100,000 writes per second at peak, reads at p99 under 100 ms, 99.95% availability for reads” is.
Estimating and then ignoring the estimate. Computing 4.5 million reads per second and then reading counts straight from the database. The estimate exists to drive the design.
Designing for a scale ten times larger than asked. Multi-region active-active for an internal tool with 2,000 users. Over-engineering is a trade-off failure, not a bonus.
One deep dive that eats the round. Spending 20 minutes on consistent hashing internals while the write path is still a single box. Timebox each deep dive to 5 to 8 minutes and check in.
No failure analysis. Never asking “what if this is slow or down?” Every dependency is eventually both. Timeouts and retries are covered in timeouts, retries and backoff.
Silent thinking. Long pauses with no narration leave the interviewer unable to give you credit or steer you. Think out loud, especially when you are unsure.
Defending instead of adapting. When the interviewer adds a constraint (“now counts must be exact”), the right move is to revisit the affected decision, not argue for the old one. Going back to step 2 is part of the method.
Real-world use beyond interviews
The same sequence is the skeleton of a good design document. Design doc templates published by many engineering organisations follow a similar shape: context and goals, non-goals, requirements, proposed design, alternatives considered, and risks. The interview is a compressed rehearsal of writing one. If you practise the framework on real proposals at work, interviews stop feeling like a separate skill.
It also works in reverse as a review checklist. When reading someone else’s design, ask: where are the non-functional numbers, where is the estimate, which access pattern justifies this store, what happens when this dependency fails? Those four questions catch most weak designs.
How to use this course
The course is organised into phases that build on each other. Each phase starts with a core article; read the phases in order the first time, then use them as reference.
| Phase | What you learn | Start here |
|---|---|---|
| How to Approach System Design | The method, estimation, latency numbers | You are here |
| Networks, Performance and Failure | DNS to response, latency, throughput, nines | How the internet works |
| Distributed Systems Fundamentals | Clocks, ACID vs BASE, consistency, CAP | Distributed systems primer |
| Scaling the Application Tier | Scaling out, statelessness, load balancing | Vertical vs horizontal scaling |
| Database Internals and Modeling | Storage engines, isolation, indexing, modelling | Storage engines |
| Scaling Data | Replication, sharding, specialised stores | Replication strategies |
| Caching, CDNs and Storage | Cache patterns, stampedes, CDNs, object storage | Cache patterns |
| APIs and Service Communication | API design, retries, idempotency, rate limits | API design fundamentals |
| Messaging and Event-Driven Systems | Delivery semantics, queues, Kafka, outbox | Delivery semantics |
| Coordination and Distributed Transactions | Quorums, Raft, leases, 2PC, sagas | Quorum systems |
| Resilience Engineering | Circuit breakers, load shedding, cells | Circuit breaker |
| Security and Identity | AuthN, OAuth, JWT, authorization, secrets | AuthN vs AuthZ |
| Observability and Operations | Telemetry, SLOs, alerting, incidents | Logs, metrics and traces |
| Infrastructure and Delivery | Kubernetes, deploys, DR, multi-region, cost | Containers and Kubernetes |
| Put It All Together | Four full designs using the whole method | Design a URL shortener |
Every article has the same shape: a production scenario, the mechanism, a worked example with real numbers, failure modes, real systems, an interview angle, a quiz and links onward. Do the quiz before moving on; if you miss one, reread that section. The capstones at the end apply this framework in full, so after finishing a few phases, try one of them on paper before reading it. There is also a separate Gen AI and Agentic AI track that starts with how LLMs work.
How to apply it: a one-page checklist
- In the first 5 minutes, have written down: 3 to 5 functional requirements, explicit non-goals, and numbers for scale, latency, availability and consistency.
- Do the estimate before drawing. Write average QPS, peak QPS and storage per year on the board where they stay visible.
- Write the API before the data model, and the data model before the diagram.
- Walk at least one read and one write through the high-level design.
- Choose deep dives by risk: the hottest path, the hardest consistency requirement, or the biggest number.
- For every major choice, say the trade-off in one sentence: gain, cost, when it flips.
- Ask “what happens if this is down?” for each box.
- Leave 3 to 4 minutes for a summary.
Interview angle
Interview questions
Q1: The interviewer gives you a vague prompt and says “you decide the requirements.” What do you do?
Propose concrete requirements and numbers, state them as assumptions, and ask for a quick confirmation. Choose numbers that make the problem interesting but not absurd, for example consumer scale (tens to hundreds of millions of DAU) for a consumer product. Write them down where both of you can see them, because every later decision will reference them. Then call out which requirement you expect to dominate the design, so the interviewer can redirect you early if they had something else in mind.
Q2: You are 30 minutes into a 45 minute round and the interviewer adds a requirement that breaks your design. How do you handle it?
Treat it as a return to step 2, not an attack. Restate the new requirement, identify which earlier decisions depended on the old assumption, and change only those. For example, if counts must now be exact and real-time, the asynchronous batch aggregator no longer works on the read path; you might keep it for analytics and add sharded synchronous counters with a read that sums the shards. Name the cost of the change (more write load, more latency on writes) and keep moving. Interviewers add constraints to see how you adapt.
Q3: How do you decide which components to deep dive on?
Use the estimates and the non-functional requirements to find the riskiest part: the path with the highest load, the strictest latency target, the strongest consistency requirement, or the largest data volume. Also ask the interviewer whether they have a preference, because they often want a specific area. Avoid deep diving on something generic and well understood, like a stateless web tier behind a load balancer, unless it is genuinely the bottleneck.
✅ Key takeaways
- Work through a fixed sequence: functional requirements, non-functional requirements, estimates, API, data model, high-level design, deep dives, trade-offs, wrap-up.
- Non-functional requirements with numbers decide most of the design. Propose them as assumptions and confirm.
- Estimate before drawing, and let the estimate change the design.
- Spend about a third of the round on deep dives; that is where seniority shows.
- State every trade-off as gain, cost, and when it flips, and ask what happens when each dependency fails.
- Staff-level answers compare alternatives, weigh complexity as a cost and cover operability and evolution.
🧠 Check your understanding
0 / 4-
1You have 45 minutes. Which plan gives the best chance of a strong evaluation?
Seniority is judged mostly in the deep dives, so you need real time left for them. A perfect high-level diagram with no deep dive reads as a mid-level answer, and skipping requirements leaves the deep dives with nothing to anchor them.
-
2Which of these is a usable non-functional requirement?
A non-functional requirement needs a number you can design against. 'Highly scalable' and 'as fast as possible' cannot be checked, and 'use microservices' is a design choice, not a requirement.
-
3Your estimate shows 4.5 million count reads per second at peak. What should change in the design?
Millions of reads per second cannot be served by counting rows, and no single database instance handles that load. The estimate is there to force exactly this kind of decision. A bigger instance is tempting but does not change the order of magnitude problem.
-
4Halfway through, the interviewer says counts must now be exact in real time. What is the best response?
New constraints send you back to the requirements step, and you update only the dependent decisions. Arguing for the old requirement signals inflexibility, and restarting wastes the time already invested.
Where to go next
- Back-of-envelope estimation: the arithmetic behind step 3, with powers of ten, peak factors and Little’s law.
- Latency numbers every engineer should know: the reference numbers that tell you which designs can meet a latency target.
- How the internet works: the first article of the next phase, following one request from DNS to response.
- Design a URL shortener: a full capstone that applies every step of this framework.
Finished this lesson?
Mark it complete to track your progress across the roadmap.