📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

๐Ÿ“š Interview question

In a system design interview, how do you gather requirements? Explain the difference between functional and non-functional requirements, the questions you always ask, and how you write down assumptions and what is out of scope before you design anything.

Requirements gathering for a design: functional vs non-functional requirements, the standard clarifying questions (scale, latency, availability, consistency, security, data residency), and recording assumptions and scope.

Junior Theory Beginner assumptions non-functional-requirements quality-attributes requirements scope system-design

๐ŸŽฏ Key points

  • Functional = what the system does (use cases, user journeys); non-functional = how well (quality attributes)
  • Ask scale: users, daily active users, read/write ratio, growth over 3–5 years
  • Performance as numbers: p95 latency (e.g. under 200 ms) and throughput (requests/s at peak)
  • Ask availability target (99.9% vs 99.99%) and recovery objectives (RPO/RTO)
  • Ask consistency needs: which data must be strongly consistent
  • Ask security, privacy and data residency (Privacy Act 1988, Australia East)
  • Write assumptions and out-of-scope items down and confirm them with the interviewer or stakeholders
  • Prioritise 3–5 core journeys; leave the rest as extensions

โฑ 30-second answer

Functional requirements describe what the system does โ€” the user journeys, such as "a patient finds a slot and books it". Non-functional requirements describe how well it does it: performance (latency and throughput), scale, availability, consistency, security, cost and data residency.

In an interview I spend about five minutes walking the main journey and asking: who are the users and how many; what's the read/write ratio; what latency at p95 and how many requests/s at peak; what availability; which data must never be wrong; any privacy or residency rules. Then I write down assumptions ("10 million users, 100:1 reads to writes, Australia only") and what is out of scope, and confirm them with the interviewer โ€” on a real project, with stakeholders.

The trade-off: ask too little and you design the wrong system; ask too much and you run out of time to design anything.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"I split requirements into two lists. Functional requirements are the behaviours: what a user can do, what the system must produce. Non-functional requirements are the qualities: how many users, how fast, how available, how consistent, how secure, how cheap. In design interviews the non-functional list is usually what decides the architecture โ€” a booking system for one clinic and one for a national chain have the same features but completely different designs.

My standard questions are: who are the users and how many daily actives; what's the read-to-write ratio; what latency do they expect, as a p95 not an average; what availability โ€” 99.9% allows about 43 minutes of downtime a month, 99.99% about 4; which data must be strongly consistent, like money or seat inventory; and are there privacy or data residency rules โ€” for Australian personal information that often means storing it in Australia East with Southeast as the pair. I also ask about growth, because designing for today's load with no headroom is a trap.

Then I write the assumptions on the board โ€” '5 million users, 50k writes a day, reads dominate 100:1, p95 under 200 ms' โ€” and an out-of-scope list, like 'no payments, no admin UI'. I ask the interviewer to confirm. The mistake I see is candidates asking twenty questions and never committing; the point is to make reasonable assumptions quickly, say them aloud, and move on. Assumptions you've written down are assumptions you can revisit later without losing the thread."


Functional vs non-functional

Functional Non-functional
Describes Behaviour Quality
Example "Users can upload a file up to 100 MB" "Uploads succeed 99.9% of the time; p95 under 2 s for 10 MB"
Drives API, data model Architecture, infrastructure, cost
Tested by Functional tests Load tests, chaos tests, SLO monitoring

The question checklist

Category Question Why it matters
Users and scale How many users, daily actives, peak concurrent? Sizes everything
Access pattern Read/write ratio? Hot items? Caching, replicas
Latency p95/p99 target per operation? Sync vs async, caching
Availability Target uptime? RPO/RTO? Redundancy, zones, regions
Consistency What must never be stale or wrong? Transactions, locking
Security and privacy Personal data? Who can see what? Encryption, access control, APP 11
Residency Must data stay in Australia? Region choice, replication
Growth Load in 3 years? Headroom, partitioning plan

Writing it down

ASSUMPTIONS                       OUT OF SCOPE
- 5M users, 500k DAU              - payments
- reads:writes = 100:1            - admin portal
- p95 < 200 ms for reads          - analytics
- 99.9% availability
- AU data stays in Australia East

Production example

On a real project, a 'simple' document portal turned out to need seven-year retention and Notifiable Data Breaches reporting because it stored tax file numbers. Capturing that in the first requirements session moved storage to immutable Blob Storage with a legal-hold policy and added audit logging; finding it after go-live would have meant a migration of several terabytes.

๐Ÿ” What the interviewer is checking

Checks that the candidate can turn a vague prompt into concrete, measurable requirements and manage scope.

Green flags

  • Clearly separates functional and non-functional requirements
  • Asks for numbers: users, ratios, percentiles, nines
  • Raises consistency and privacy without prompting
  • Writes assumptions and out-of-scope items down

Red flags

  • Starts designing with no questions
  • Accepts adjectives as requirements
  • Asks endless questions without committing

๐Ÿ“š Learn in depth

1. Why non-functional requirements dominate design

Two systems with identical features can need completely different architectures. A to-do app for 100 users runs on one App Service instance and one Azure SQL Basic database. The same app for 50 million users needs partitioned storage, caching, multiple regions and an on-call rota. Functional requirements shape the API and data model; non-functional requirements shape everything around them.

2. Turning vague words into testable numbers

Vague Testable
"Fast" p95 < 200 ms, p99 < 500 ms for GET /items
"Always up" 99.95% monthly availability, RTO 15 min, RPO 5 min
"Scalable" 2,000 requests/s at peak, 3ร— growth in 2 years
"Secure" Personal data encrypted at rest; access logged; MFA for admins

A number can be measured, alerted on and turned into an SLO later.

3. The nines, roughly

99%     -> ~7.3 hours down per month
99.9%   -> ~43.8 minutes per month
99.95%  -> ~21.9 minutes per month
99.99%  -> ~4.4 minutes per month

Each extra nine typically means more redundancy (zones, then regions), more automation and more cost.

4. Consistency is a per-data decision

Ask which data must be strongly consistent. In an e-commerce system, stock reservations and payments need strong consistency; product reviews and recommendation counts can be eventually consistent. Saying this early lets you use cheaper, faster options for most of the system.

5. Scope management

An out-of-scope list protects your time. It also shows product sense: you know the core use case and you're deliberately deferring the rest. Keep 3โ€“5 core features.

Try it yourself

  1. Take a system you know and write five functional and five non-functional requirements with numbers.
  2. Convert "the site must be fast and reliable" into three measurable statements.
  3. Calculate the monthly downtime budget for 99.95% and 99.99%.
  4. For an app storing personal information, list which Australian Privacy Principles affect the design (start with APP 8 and APP 11).
  5. Practise the requirements step for "design a chat app" against a 5-minute timer.

๐Ÿ’ป Code

Writing non-functional requirements as data makes them checkable later โ€” for example, a load test or SLO check can read the same targets.

namespace Design.Requirements;

// Non-functional requirements as numbers, not adjectives.
public sealed record LatencyTarget(string Operation, TimeSpan P95, TimeSpan P99);

public sealed record NonFunctionalRequirements(
    int DailyActiveUsers,
    double ReadWriteRatio,
    double AvailabilityTarget,          // 0.999 = 99.9%
    TimeSpan RecoveryTimeObjective,
    TimeSpan RecoveryPointObjective,
    string PrimaryRegion,
    IReadOnlyList<LatencyTarget> Latency)
{
    // Monthly downtime budget the availability target allows (30-day month).
    public TimeSpan MonthlyDowntimeBudget => TimeSpan.FromMinutes(30 * 24 * 60 * (1 - AvailabilityTarget));
}

public static class Example
{
    public static NonFunctionalRequirements Booking() => new(
        DailyActiveUsers: 500_000,
        ReadWriteRatio: 100,
        AvailabilityTarget: 0.999,
        RecoveryTimeObjective: TimeSpan.FromMinutes(30),
        RecoveryPointObjective: TimeSpan.FromMinutes(5),
        PrimaryRegion: "australiaeast",
        Latency:
        [
            new("GET /slots", TimeSpan.FromMilliseconds(200), TimeSpan.FromMilliseconds(500)),
            new("POST /bookings", TimeSpan.FromMilliseconds(400), TimeSpan.FromSeconds(1)),
        ]);
}

// Example.Booking().MonthlyDowntimeBudget == 43.2 minutes

โš  Common mistakes

  • Mistake: Only listing features. Why it is wrong: Features don't tell you whether you need one server or fifty. Instead: Always ask scale, latency, throughput, availability and consistency.
  • Mistake: Accepting "fast" or "highly available" as a requirement. Why it is wrong: You can't design or test against an adjective. Instead: Turn it into a percentile latency, a throughput figure or a number of nines.
  • Mistake: Using averages for latency. Why it is wrong: Averages hide the slow tail users actually feel. Instead: Ask for p95 or p99 targets.
  • Mistake: Asking questions without committing. Why it is wrong: You burn time and the interviewer may just say "you decide". Instead: Propose a reasonable assumption and ask the interviewer to confirm.
  • Mistake: Gathering requirements alone. Why it is wrong: On a real project, assumptions nobody validated become the requirements by default, and product, security and operations find the gaps after build. Instead: Review the assumptions and out-of-scope list with stakeholders (product owner, security, operations) and record their sign-off.
  • Mistake: Forgetting privacy and residency. Why it is wrong: In Australia, personal information brings Privacy Act obligations and often a requirement to keep data onshore, which affects region and backup choices. Instead: Ask whether personal or sensitive data is stored and where it may live.
  • Mistake: Not writing assumptions down. Why it is wrong: You and the interviewer lose track, and later decisions look arbitrary. Instead: Keep an assumptions box on the board and refer back to it.

๐Ÿ› Senior insight: trade-offs

A senior uses requirements to delete work. Every requirement you can prove isn't needed (multi-region, real-time updates, five nines) removes cost and complexity. The best requirements question is often "what happens if this is five minutes stale?" because the answer usually unlocks caching and async processing.

Seniors also separate requirements from solutions. "Use Kafka" is not a requirement; "process 10,000 events per second without losing any" is.

Technique When it fits Cost When not to
Quick assumptions, confirm Interview, early discovery Risk of a wrong assumption Regulated domains with fixed rules
Quality attribute scenarios Real projects, architecture reviews Workshop time 45-minute interview
SLO-first requirements Services with clear user journeys Needs monitoring in place Prototype or throwaway

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions quality attributes or measurable non-functional requirements Why: Checks whether the candidate can make NFRs testable on a real project
    How to answer

    A quality attribute scenario makes a non-functional requirement testable. It names the stimulus (what happens: 500 search requests a second), the environment (under what conditions: normal peak, one zone down) and the response measure (the number that decides pass or fail: p95 under 300 ms).

    A fitness function automates that check so it runs continuously:

    • a load test (Azure Load Testing or k6) run as a pipeline stage in Azure DevOps or GitHub Actions, with a pass/fail criterion like p95(response_time_ms) > 300 that fails the build;
    • an architecture test (NetArchTest, ArchUnitNET) that fails if Payments references Applications;
    • an SLO alert in Application Insights / Azure Monitor for what only production can show.

    Scenarios are revisited as load and priorities change. The trade-off: every fitness function costs pipeline time and upkeep, so automate the few attributes that really matter.

  2. When: Candidate mentions availability targets or latency percentiles Why: Checks the link from requirements to SLIs, SLOs and error budgets
    How to answer

    An SLI is a measurement of user experience expressed as a ratio of good events to valid events, for example requests to /api/orders answered in under 300 ms with a non-5xx status รท all requests. An SLO is the internal target for that SLI over a rolling window, such as 99% over 28 days. An SLA is the external contract with financial penalties, deliberately looser than the SLO (say 99.5% vs 99.9%) so you breach the SLO first.

    To turn a latency percentile into an SLO, rephrase it as a threshold ratio: "99% of requests complete in under 300 ms", computed from the ASP.NET Core http.server.request.duration histogram buckets, not by averaging p99s. The error budget is 1 โˆ’ SLO: at 99.9% over 30 days that is about 43 minutes or 0.1% of requests. When the budget is spent, risky releases pause and reliability work takes priority. The trade-off: each extra nine costs far more engineering and infrastructure.

  3. When: Candidate gives a user count as an assumption Why: Checks that the candidate can turn the scale assumption into numbers that drive the design
    How to answer

    A capacity estimate turns user numbers into load. Start with daily active users ร— actions per user to get requests per day, divide by ~86,400 s (round to 10^5) for average requests/s, then multiply by a peak factor (2โ€“10ร—, often 3ร—). For storage, multiply writes per day by record size and 365, then add indexes and replicas. For bandwidth, multiply requests/s by payload size.

    Example: 10M DAU ร— 20 reads = 200M reads/day โ‰ˆ 2,300/s average, ~7,000/s peak.

    The point is not precision โ€” it's deciding whether one database and a cache are enough or you need partitioning. The trade-off is speed versus accuracy: round hard, but state every assumption.

โ†ฉ Usually asked after

More in Core System Design

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

โช Previous ๐Ÿ  Main Next โฉ
๐Ÿ’ฌ Chat with me