System Design HLD-18.02
Functional and non-functional requirements
Turning a vague prompt into a scoped problem: asking good clarifying questions, separating what the system does from how well, and naming what is out of scope.
The big idea
"Design Instagram" could mean a photo store, a social graph, a feed ranker, a messaging system, a video platform or all of them. Ten different candidates will design ten different systems, and most of them will design something nobody asked for. The first five minutes of any design, interview or real, are about turning a vague request into a precise problem.
Requirements come in two kinds. Functional requirementsWhat the system must do: the features and behaviors users rely on, such as upload a photo or follow a user. say what the system does. Non-functional requirementsHow well the system must do it: scale, latency, availability, consistency, durability, security and cost. say how well it must do it. The functional ones decide the API and data model; the non-functional ones decide almost every architectural choice, from caching to replication to consistency.
Think of commissioning a house. "Three bedrooms and a kitchen" are functional requirements. "Must survive an earthquake, stay warm in winter, and cost under a budget" are non-functional, and they shape the building far more than the room list does.
How it works
Step 1: Ask, then write it down
Good clarifying questions are specific and change the design:
- Who and how many? Daily active users, read to write ratio, global or one region.
- Which features are in scope? Pick the three or four core ones; ask before adding more.
- How fast? Latency targets for the main reads and writes ( Latency vs throughput, and why percentiles matter ).
- How available, and how consistent? Is a stale feed acceptable? Is a lost message acceptable? Is a double charge?
- How long is data kept? Retention changes storage by orders of magnitude.
Then write the answers where both sides can see them, including assumptions you make when the interviewer says "you decide".
Step 2: A worked example
Notice what the non-functional list does. "Redirects at p99 under 50 ms" and "99.99 percent available" immediately suggest caching redirects and replicating the store; "never lose a link" rules out keeping links only in a cache. The design starts writing itself. The full case study is in Design a URL shortener .
Step 3: Name what is out of scope
Saying explicitly "I'll leave analytics and user accounts out unless you want them" does two things: it shows you thought of them, and it stops you spending time on them. Interviewers almost always agree, or redirect you to what they want.
Try it
Trade-offs
| Option | Wins when | Loses when |
|---|---|---|
| Narrow scope (3 or 4 features) | Time-boxed interviews: room to go deep | Coverage of the full product |
| Broad scope | Early product planning and roadmaps | Depth: every component stays shallow |
Common mistakes
- Starting to draw before asking a single question.
- Listing features but no numbers, so no design decision can be justified.
- Asking dozens of questions and using up the time budget.
- Silently adding features nobody asked for.
Check yourself
-
Which is a non-functional requirement?
Show answer
B. Likes appear to other users within 5 seconds It sets a freshness and latency expectation, not a feature.
-
Why state what is out of scope?
Show answer
B. To show you considered it and protect your time for the core problem It sets expectations and keeps focus.
-
The interviewer says 'you decide the scale'. What should you do?
Show answer
B. State a reasonable assumption and write it down Explicit assumptions make every later decision checkable.
-
Which requirement most directly suggests replication?
Show answer
B. 99.99 percent availability High availability requires surviving component failures, which needs redundancy.
Recap
- Spend the first minutes turning a vague prompt into a precise problem.
- Functional requirements say what the system does; non-functional say how well.
- Ask specific questions about users, scale, latency, availability, consistency and retention.
- Write down answers and assumptions where both sides can see them.
- Name what is out of scope to protect your time.
Next up
- Crack the system design round learning path