Skip to content
learn
  1. Learn
  2. High Level System Design
  3. The System Design Interview Framework

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.

Beginner 10 min Last reviewed

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

Turning 'design a URL shortener' into scoped requirements A vague prompt on the left feeds three boxes: functional requirements (shorten a URL, redirect, optional custom alias, expiry), non-functional requirements (100 million new links a month, redirects under 50 milliseconds at p99, 99.99 percent availability for redirects, links never lost), and out of scope (analytics dashboard, user accounts, link editing). Design a URL shortener Functional shorten . redirect . custom alias . expiry Non-functional 100M new links/month . redirect p99 < 50 ms . 99.99% . never lose a link Out of scope analytics dashboard . accounts . editing links Figure 1. One line becomes three lists. The functional list fixes the API, the non-functional list drives the architecture, and the out-of-scope list protects your time.

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

Functional or non-functional requirement?

Show answers
  • Users can follow other users: Functional. A feature: something the system does.
  • The home feed loads in under 200 ms at p99: Non-functional. A latency target: how well.
  • Messages are delivered in the order they were sent: Non-functional. An ordering and consistency guarantee.
  • Users can upload a profile photo: Functional. A feature.
  • No uploaded photo is ever lost: Non-functional. A durability requirement.
  • The service handles 50,000 writes per second at peak: Non-functional. A scale requirement.

Trade-offs

OptionWins whenLoses 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Get new lessons by email

Get new posts on backend and AI internals. No spam, unsubscribe anytime.

Your email is only used to send new posts. Privacy

Next up