Skip to content

Functional and non-functional requirements

Functional requirements say what a system does; non-functional requirements say how well, each stated as a checkable number or rule. Set before the first component, they give the later trade-offs something to argue from.

On this page

What it is

A functional requirement names something the system does: a user posts a message, a search returns results, a payment is recorded. The common template is "the system shall do X", one action with an input and an output. A non-functional requirement describes a property of the system as a whole rather than one action: how fast, how available, how consistent, how large. Its template is "the system shall be X", and these properties are also called quality attributes or, informally, the "ilities". The standard advice is to write them in a specific, measurable form, which is what turns "fast" into "p99 under 200 ms".

The ISO/IEC 25010:2023 product quality model lists nine characteristics: functional suitability, performance efficiency, compatibility, interaction capability, reliability, security, maintainability, flexibility and safety. You don't recite that list in a round. Treat it as a menu to pick from. For a user-facing service, the properties that shape the architecture are usually availability, latency and throughput; for a storage system, latency, availability and durability. Add the consistency you need between a write and the reads that follow, and you have the handful of targets worth stating: a number where the quality is a quantity, a rule where it isn't.

PartWhat a strong answer givesWhat it does for the design

Questions first

Who the users are, how many, how fast it grows, which feature matters most

Picks the problem you're solving; a startup's design differs from one serving millions

Functional list

Three to five verbs the system supports, said aloud or written down

Sets the entities and the API; a feature not on the list is a candidate to cut once you've checked nothing else depends on it

Non-functional targets

A checkable target each for latency, availability, consistency and scale: a number or a rule

Shapes replication, caching and the data store; later trade-offs about those can point back here

Out of scope

At least one feature you won't design, with the reason

Buys time for depth and shows you chose, rather than forgot

Availability needs a conversion. Google's SRE book publishes the table: with no planned downtime, 99.9% allows about 8.76 hours of unavailability a year, 99.99% about 52.6 minutes, and 99.999% about 5.26 minutes. The book also notes that for a service that is partially up, counting the share of failed operations is more useful than measuring outage length. Our advice: when you say "four nines", know that you've committed to under an hour a year, and check each part of the design, from failover time to deploys, against that budget. Pick the number from what the user would tolerate, then let it drive the design.

Latency needs a percentile. The same book prefers percentiles to the mean: a high percentile such as the 99th shows a plausible worst case, the median shows the typical case, and the average hides the tail. It warns against asking for a system that is up at all times or scales without limit, calling that unrealistic and expensive to approach, and it recommends as few objectives as will cover the system, each one you could defend in an argument about priorities. In a round, that means "p99 under 300 ms for feed load" is usable and "as fast as possible" is not.

Consistency and scale are requirements too. Consistency rarely comes with a percent sign, so state it as a rule: which reads must see the latest write (your own post appears in your own feed at once) and which may lag (a follower's feed can run behind). Scale is a set of counts: daily active users, peak requests per second, the size of one record, how long data is kept. Those counts are the inputs to back-of-the-envelope estimation, and the consistency rule is what consistency models later turn into a mechanism.

When to use it

At the start of a system design round, before the first component. ByteByteGo's framework makes understanding the problem and setting the scope its first step and gives it 3 to 10 minutes of a 45-minute round. It suggests asking which features to build, how many users there are, how fast the company expects to grow, and what stack already exists; if the interviewer asks you to assume instead of answering, write the assumption down so you can refer to it later. It also points out that there is no single right answer, since a system for a young startup differs from one for an established company with millions of users, which is the reason to ask about scale before drawing.

Again whenever a trade-off comes up. When you choose between two options later, point at the requirement that decides it: "we agreed on under an hour of downtime a year, so I'm checking the failover time against that budget", or "we said followers can lag, so fan-out can be asynchronous". That is what makes the first ten minutes worth it: the targets become the arguments in stating a trade-off. A target you would not quote in such an argument is probably not worth stating.

When not to

When the interviewer hands you the spec. If the prompt already lists the features and the targets, confirm them in a sentence and move on. The framework's 3 to 10 minutes is a rough guide that depends on the scope of the problem, and a long requirements phase on a problem that was already pinned down spends time you need for the deep dive.

When a quality doesn't shape the design. The nine ISO characteristics are a menu, not a form to fill. Our advice: spend the minutes on the qualities that decide a storage, replication or caching choice for this problem, and cover maintainability, flexibility and interaction capability in one breath as "standard", unless the prompt makes one of them central.

When you'd be inventing a number. Google's SRE book cautions against choosing a target from current performance without reflection, and says it's better to start with a loose target and tighten it than to pick a strict one you later have to relax. Our advice for the room: if you don't know the right figure, propose one, say it's an assumption, and ask whether it fits. Demanding five nines for a tool whose outages cost little makes the design heavier than its users need, so match the number to what an outage would cost.

In a narrower round. For a single-component question (a rate limiter library, an in-memory cache), the functional list is one line and the non-functional part is about time and memory per operation rather than nines of availability. In a frontend design round the same two lists apply, but the numbers are about render and interaction time, bundle size and offline behavior, not replication. Use the shape, change the measures.

Compared

RequirementThin versionFull versionWhen the thin version is enough

Functional list

"Like Twitter."

Post a tweet, follow a user, view the home timeline, search tweets.

The interviewer already listed the features: repeat them back in one sentence.

Latency

"Low latency."

Timeline loads with p99 under 500 ms; posting may take up to a second.

A batch job nobody waits on: name throughput instead and skip the percentile.

Availability

"Highly available."

99.9% for reads, which the availability table puts at under nine hours down a year; writes may degrade first.

An internal tool used in office hours, where 99% is fine and keeps the design simpler.

Consistency

"Strongly consistent."

Your own tweets appear at once; followers may see them seconds later.

Read-mostly public data where staleness is harmless: say eventual is fine and move on.

Scale

"Lots of users."

10 million daily users, reads outnumber writes about 100 to 1, 1 KB per tweet, kept for 5 years.

A single-machine component question, where the scale is one process.

Out of scope

Nothing named.

Not designing login or media upload: media is its own pipeline, and I'll assume an authenticated user ID arrives with each request so the timeline design can take identity as given.

A prompt that is already narrow, where one sentence covers it.

In a picture

Prompt: design XAsk: users, scale,prioritiesFunctional: 3 to 5verbsNon-functional: anumber eachOut of scope, witha reasonFirst componentTrade-offscite thetargets
Requirements come before the first box, and the later trade-offs point back at the numbers you set.

How to say it in an interview

The common mistake

Quiz

You tell the interviewer the service should be "four nines" available. Roughly how much downtime a year does that allow?
Which of these is a non-functional requirement?
The interviewer says "design a URL shortener" and nothing more. What's the best first move?
Why state latency as a percentile such as p99 rather than an average?

Related

Sources

  1. Non-functional requirement (Wikipedia)
  2. ISO/IEC 25010 - Systems and Software Quality (arc42 Quality Model)
  3. Availability Table (Site Reliability Engineering, Google)
  4. Chapter 4: Service Level Objectives (Site Reliability Engineering, Google)
  5. A Framework for System Design Interviews (ByteByteGo)
Sign in to report a mistake