A system design round doesn’t grade how many boxes you draw; it grades how you get from a vague prompt to a design with reasons. This post is the frame for that: four steps, how to ask about functional and non-functional requirements, and how to judge your own design. The posts on estimation and scalability, performance and availability principles build on it.
1. What system design is, and how interviews differ from real life
Key idea: system design is the process of defining a system’s structure and operation so it meets its requirements. Architecture is its strategic layer; design is the tactical layer for each specific problem.
| Architecture | Design | |
|---|---|---|
| Abstraction | Highest, strategic | Medium-high, tactical |
| Goal | Meet FRs and NFRs, steer the whole development effort | Meet FRs and NFRs, produce a detailed plan to build |
| Scope | Global: architectural style, communication style (sync, async), NFR-heavy | Local: one function or problem, picking data structures and technology |
A short way to remember it: architecture is the overall design.
Interviews and reality differ in two ways:
- Interviews usually build from zero with resources assumed sufficient. You’re graded on reasoning.
- Reality is bounded by time, cost, team skills and legacy systems, plus side effects nobody foresaw. A “beautiful” design the team can’t operate is a bad design.
The knowledge map: what to learn first
The course splits knowledge into three layers:
- High level (feeds system design directly): architecture, architectural patterns, DDD, communication (REST, RPC, message brokers), problem solving.
- Mid level (advanced backend): cloud, CI/CD, design patterns, caching, databases, frameworks, languages.
- Low level (fundamentals): data structures and algorithms, operating systems, networking, concurrent programming, computer architecture.
The suggested strategy: learn the important things first (scaling out, databases, caching, communication) and accumulate fundamentals over time. When you get stuck on something important, say why Kafka is fast, dig down into the related fundamentals (page cache, sequential writes in the I/O model post).
Learning follows a U shape: start from the abstract concept, go down to hands-on practice, then come back to the abstract level with a deeper understanding.
2. What the interviewer grades
Key idea: four things: how you solve problems, how solid your fundamentals are, how you communicate, and (bonus) product sense. The final diagram is only evidence for those four.
- Problem solving: how you clarify the prompt and how you analyse the problem and the options.
- Solid fundamentals: when asked “why”, you answer with data structures, I/O and networking, not “company X uses it too”.
- Communication: you lead proactively, state your assumptions, present in order, and pick up the interviewer’s hints.
- Product sense: you know which feature makes money and what users actually need.
3. Four steps and how to split 45 minutes
Key idea: follow four fixed steps so you don’t get lost and so the interviewer sees you have a process. There is no “final” design: a decision during the deep dive can force you to revise the high-level design.
flowchart LR
A["1. Understand the problem, scope it"] --> B["2. Estimate"]
B --> C["3. High-level design: API, data model, diagram"]
C --> D["4. Deep dive"]
D -.->|new finding| C
| Step | What you do | Suggested time |
|---|---|---|
| 1. Understand the problem | FRs (at most 3), NFRs with numbers, assumptions, out of scope | 5–8 min |
| 2. Estimate | Read/write QPS, storage, bandwidth, cache memory | 3–5 min |
| 3. High-level design | API (proves you understand how each feature works), data model (a summary of steps 1–2), block diagram | 10–15 min |
| 4. Deep dive | 1–2 hard parts: storage, concurrency, hot keys, failures | 15–20 min |
| Wrap-up | Summary, remaining bottlenecks, how it would evolve | 2–3 min |
4. Understanding the problem: expectation and reality
Key idea: a problem is the gap between perceived reality and stakeholders’ expectations. To understand it, clarify both ends: the expectation (requirements) and the reality (existing system, constraints, assumptions).
That definition is unpacked in the post on problem solving like a senior. In a system design round it becomes a checklist:
- Expectation: functional requirements, non-functional requirements, stakeholders (who uses it, who pays, who runs it), timeline.
- Reality: existing infrastructure, budget, deadline, team skills. Interviews usually build from scratch, so this is often skipped, but one sentence like “I’ll assume a greenfield build and a team that knows Java and PostgreSQL” earns points.
- Explicit assumptions: principle 2 is to separate opinions or assumptions from facts. Say assumptions out loud and write them on the board so the interviewer can correct them.
5. Functional requirements: pick at most three
Key idea: a functional requirement (FR) is something the system does for its users. A real system has dozens, but in 45 minutes you solve at most three: what directly solves the customer’s problem and what directly makes money.
Two questions to filter the key FRs:
- Which feature directly solves the customer’s problem? Airbnb: searching homestays by location.
- Which feature directly makes the business money? Airbnb: booking.
Write each FR as a sentence with three parts: actor (who), activity (does what), work object (on what). Example: “A patient (actor) schedules (activity) an appointment (object) with a doctor (actor).” A complete sentence exposes the entities for the data model and the endpoints for the API.
Questions to clarify functional requirements
- Data flow, domain story: where does the data go? Booking: guest searches → views → holds → pays → host confirms.
- The most frequent query: which information is read the most? The answer sets the access pattern, which in turn sets indexes, caching and how data is split.
- Flexibility: is the search radius configurable? Filters by price or amenities?
- Product type: in-house, or sold to many customers (SaaS, multi-tenant)? SaaS brings tenant data isolation with it.
- User experience:
- Is real time needed? Is a feed that updates after 1 second or 1 minute fine?
- Edge cases: what if two people book the same room at the same moment?
- Delivery guarantee: may a notification be lost? Sent twice?
6. Non-functional requirements: turn adjectives into numbers
Key idea: a non-functional requirement (NFR) is a property that affects how the system runs and feels, not tied to one feature. “Fast” and “stable” aren’t requirements yet; “p99 < 200 ms at 10K QPS” is.
| NFR | Type | Question that yields a number |
|---|---|---|
| Performance | Operational | What p99 latency in ms? What throughput in QPS? |
| Availability | Operational | What % of the time must it serve (99.9% ≈ 8.8 hours down/year)? |
| Reliability | Operational | Does a failure cost money? How much data may be lost (RPO)? |
| Scalability | Operational | How fast does load grow per year? Any spikes (flash sales)? |
| Maintainability | Structural | How long to ship a feature? How many teams change it? |
| Security | Cross-cutting | Must sensitive data be encrypted at rest? Who may see what? |
Three groups of questions produce the numbers you’ll use for estimation:
- Load: total users, DAU (daily active users), average actions per user per day.
- Throughput: QPS (queries per second), TPS (transactions per second), read:write ratio.
- Storage: is history kept, for how long (retention), size of one record, growth rate (say +20% customers a year), is compression allowed.
How to find the key NFRs: what ruins the user experience (Airbnb: search must be fast → performance; a bank: must not be wrong → reliability) and what blocks business growth (an e-commerce platform with many products, merchants and payment methods → scalability).
Example: NFRs with numbers for a homestay booking system
- 50 million users, 5 million DAU, 10 searches per user per day → 50 million searches/day ≈ 600 QPS on average; peak hours 3–5× ≈ 3K QPS.
- Bookings: 200K/day ≈ 2–3 TPS, but never sell the same night twice (reliability, strong consistency on the booking path).
- Search: p99 < 300 ms. Results a few seconds behind the latest price are fine (eventual consistency on the read path).
- Availability: search 99.95%, booking 99.9% (returning an error beats a wrong booking).
- Keep booking history for 7 years (accounting rule); photos live in object storage.
Notice that one system has two sets of NFRs for two paths. Splitting the read path from the write path like this is the first step of almost every good design.
7. Judging a design before writing code
Key idea: the necessary condition is meeting the FRs, NFRs and constraints and explaining it clearly. The sufficient condition is evidence from fundamentals for each choice, found by asking “why” all the way down.
- Necessary: meets both FRs and NFRs; satisfies constraints (timeline, cost, team skills); documented and explainable.
- Sufficient: strong evidence. Example requirement “find values X from 34 to 88”: a B+Tree keeps its leaves sorted, finding one end of the range costs O(log N), then you scan M adjacent entries, O(log N + M) in total. It’s hard to find a better structure for range queries, so choosing a B-Tree index has a reason (see indexes from the inside).
- Scalability: can the design keep going when load grows 10×, and which part breaks first?
Principle 3 is trade-off: know each option’s limits and be able to answer “why this and not that”. There’s a separate post on how to talk about it: analysing trade-offs like a senior.
Exercises
Exercise 1: Functional requirements of a dating app (Tinder-like)
Task (paraphrased): list the FRs of a dating app, then choose the ones worth solving in 45 minutes.
Solution to exercise 1
Full list of FRs:
- Users create and edit a profile (photos, age, interests).
- The system generates a feed of profiles by location and filters (age, distance, gender).
- Users swipe like or pass; two mutual likes become a match.
- Matched users chat.
- Users buy a paid plan (see who liked you, unlimited swipes).
Pick three: location-based feed (directly solves “find people near me”), swipe and match (the core of the product), paid plan (makes money). Chat can be out of scope; it’s a whole messaging design on its own.
Worth a deep dive: the location feed needs a spatial index (geohash, quadtree or PostGIS) and has to exclude already-swiped profiles (a large set per user; a Bloom filter helps). Matching must catch two likes that arrive almost at the same moment.
Exercise 2: Non-functional requirements of a food delivery system (DoorDash-like)
Task (paraphrased): find the important NFRs and give each one a number.
Solution to exercise 2
- Scalability: load piles up at meal times (11–13h, 18–20h), 5–10× off-peak. Say 10 million orders/day, peak ~1,000 orders/second. Driver locations every 4 seconds: 500K online drivers → ~125K writes/second, which is actually the heaviest part.
- Availability: ordering at 99.95%. Going down at peak hours loses revenue directly.
- Performance: restaurant search p99 < 300 ms; driver matching within seconds; driver position on the map lagging ≤ 5 seconds.
- Reliability: an order must never be charged twice or assigned to two drivers.
Order: availability and scalability on the ordering path, reliability on payment and driver assignment, performance on search.
Exercise 3: Non-functional requirements of a crypto exchange (Binance-like)
Task (paraphrased): find the trading engine’s NFRs and explain why the order differs from exercise 2.
Solution to exercise 3
- Reliability: matching must be exactly right, no lost orders, no double fills. Usually one sequential matching loop per trading pair, with an event log to rebuild state.
- Security: real money, a top attack target. Sign and authenticate every API call; withdrawals get several confirmation layers.
- Latency: matching in micro- to milliseconds; p99 for pushing order book updates to users < 100 ms.
- Availability: 99.99% (~52 minutes down/year). But when data looks suspicious, halt matching rather than keep going.
Unlike exercise 2, correctness beats availability here. Food delivery can reassign a driver; an exchange can’t match wrongly and fix it later.
Remember
- Name the four steps of a system design round and how to split 45 minutes across them.
- Explain why you pick at most three FRs, and the two questions for picking them.
- Turn “the system must be fast and stable” into concrete numbers.
- Tell availability from reliability, and know when reliability comes first.
- Give mechanism-level evidence for a choice instead of “company X uses it”.
Interview questions
Junior
What’s the difference between functional and non-functional requirements?
Functional is what the system does (book a room, send a message); non-functional is how well it does it (how fast, what % availability, how much load).
FRs produce the API and the data model. NFRs drive the architecture: whether you need a cache, replicas, sharding or a queue.
What do you do in the first ten minutes of a system design round?
Ask questions to settle at most three FRs, get numbers for the NFRs, state assumptions out loud, and only then estimate.
Example questions: “Who are the main users?”, “How many DAU?”, “What’s the read:write ratio?”, “Do we need real time?”, “Is losing data acceptable?”.
Mid
How do you know which NFR matters most for a system?
Ask two questions: what ruins the user experience, and what blocks the business from growing.
Slow homestay search makes guests leave (performance). A bank that miscalculates loses trust (reliability). A marketplace that can’t onboard more merchants can’t grow (scalability).
An API always returns 200 but occasionally charges twice. Which NFR is missing?
Reliability, not availability. The system answers, but answers wrong.
The usual fix is an idempotency key on the charge and a unique constraint in the database (see idempotency in distributed systems).
How is architecture different from design?
Architecture is global, hard to change and NFR-driven (architectural style, sync vs async). Design is local to each problem (data structures, algorithms, technology).
A low-level design decision can still force an architecture change, for example discovering that one table needs sharding changes how services are split.
Senior
How do you show your design is good before writing any code?
Check the necessary conditions (meets FRs, NFRs, constraints, explainable) and the sufficient one (mechanism-level evidence for each choice, found by asking “why” down to the fundamentals).
Add estimates with numbers to point out the bottleneck, and walk through failure scenarios in your head: a node dies, load goes 10×, one key gets too hot.
The interviewer gives a very vague prompt: “design Tinder”. How do you handle it?
Narrow it: pick three FRs (location feed, swipe and match, paid plan), put chat out of scope, ask for load numbers, and state assumptions.
Then confirm: “I’ll focus on the feed and matching and leave chat for later if there’s time. Does that work?” Asking for confirmation keeps you both on the same problem.
What’s your NFR priority order for an e-wallet, and how does it differ from a social network?
E-wallet: reliability and security first, then availability, scalability, performance. Social network: availability and latency first; consistency only needs to be eventual.
That order drives the trade-offs: the wallet returns an error when unsure, the social network returns slightly stale data.
Useful phrases for interviews
- “Before I draw anything, let me clarify the requirements.”
- “I’ll limit the scope to three functional requirements: search, booking and payment.”
- “Chat is out of scope for this session, unless you’d like me to cover it.”
- “Let me write down my assumptions so you can correct me.”
- “When you say fast, would p99 under 200 milliseconds be the right target?”
- “The read path and the write path have different non-functional requirements.”
- “For payments, reliability matters more than availability: I’d rather return an error than charge twice.”
- “The reason I chose a B-Tree index is the range query: it’s O(log N plus M).”
- “Which component would you like me to deep dive into?”
- “To wrap up, the main remaining bottleneck is writes to the location table.”
Notes based on the System Design course (Ronin Engineer), rewritten in my own words.