What it is
Functional requirements describe what a system does: its features, the inputs it accepts and the outputs it produces. "A user can create a note", "a user can list their notes", "an admin can delete any note".
Non-functional requirements (also called quality attributes) describe how well it does those things and under which constraints: latency, throughput, availability, durability, consistency, security, compliance, cost, operability. They are the requirements that decide the architecture. A single process on a laptop can implement every feature of most products; it cannot serve 50,000 requests per second, survive a data-centre fire or keep personal data inside the EU.
Why it exists
Without explicit targets, design discussions turn into arguments about taste. Should there be a cache? A queue? A second region? Each answer depends on numbers that nobody wrote down. Non-functional requirements turn those arguments into checks: does the design meet P95 under 200 ms at 150 requests per second? If yes, the cache is optional; if no, something must change.
Writing them down also exposes conflicts early. Low latency, strong consistency across regions and low cost pull against each other; a product team that wants all three has to choose before the design is built.
How it works
1. Collect the functional scope. List the core use cases and decide which are in scope. In an interview this is two to five features; in a real project it is a backlog, but the architecture is usually driven by a handful of hot paths (read a feed, write a message, check out a cart).
2. Turn every quality into a number. A useful non-functional requirement names a metric, a threshold, a percentile or period, and the load it applies to:
| Vague | Measurable |
|---|---|
| "Fast" | P95 latency of GET /notes under 200 ms at 150 req/s |
| "Scalable" | 150 req/s at peak, growing to 600 req/s within 18 months |
| "Always up" | 99.9% of requests succeed per 30 days; losing one server or one zone causes no outage |
| "Doesn't lose data" | An acknowledged write survives the loss of any one machine (RPO 0); restore from backup within 4 hours (RTO) |
| "Secure" | All traffic over TLS 1.2+; personal data encrypted at rest; stored only in EU regions |
Percentiles matter because averages hide the slow tail that users notice. The load matters because latency at 20 req/s says nothing about latency at 150 req/s.
3. Estimate. Back-of-the-envelope numbers connect requirements to resources: requests per second at peak (daily volume ÷ 86,400 × a peak factor), data growth per year, bandwidth, and the capacity of one instance. In the lesson one server handles about 125 req/s, so a 150 req/s peak needs two, and surviving one failure needs three.
4. Design to the targets, and test the design against them. Each non-functional requirement adds, sizes or rules out a component. In the lesson the throughput target added a load balancer and a second server; the availability target added a third. Then check every requirement against every failure you care about: a design that meets throughput with all servers healthy can still miss availability.
5. Keep the trace. Write the requirement next to the component it justifies. This makes reviews faster, shows what can be cut when budgets shrink, and tells the next engineer which numbers to re-check when the requirements change.
When to use it
Always, but proportionally. A weekend prototype needs one line of requirements; a payment system needs a document. In system design interviews, spend the first few minutes on functional scope and the key numbers (users, read/write ratio, peak load, latency target, availability, data size). Interviewers grade this step explicitly, and every later choice is easier to defend against it.
When not to
- Do not invent precision you do not have. If nobody knows the peak load, state an assumption, label it as one and design so it can change.
- Do not freeze requirements for a product still searching for users. Write the ones that are expensive to change later (data model, durability, compliance) and keep the rest loose.
- Do not list every "-ility". A requirement nobody will measure or pay for is noise that hides the ones that matter.
Trade-offs
| Requirement pushed harder | Typically costs |
|---|---|
| Lower latency (P99 instead of P95, tighter thresholds) | Caching and its staleness, more replicas closer to users, more capacity headroom |
| Higher availability (each extra nine) | Redundancy in every tier, multi-zone or multi-region deployment, more operational work and money |
| Stronger consistency | Higher write latency, lower availability during partitions (see CAP and PACELC) |
| Higher durability | Synchronous replication or quorum writes, which add latency |
| Lower cost | Less headroom, slower recovery, fewer regions |
The job is not to maximise every quality but to meet the stated targets at acceptable cost, and to make the trade-offs visible to the people who set the targets.
Alternatives
- User stories with acceptance criteria: functional scope plus testable conditions; non-functional criteria can be attached as "definition of done" rules.
- Quality attribute scenarios (from the SEI's architecture methods): "when one server fails at peak, the system keeps serving with under 1% errors". These are non-functional requirements phrased as testable stimuli and responses.
- SLOs: once a system runs, its non-functional requirements become service level objectives measured from real traffic, with error budgets that decide when reliability work beats feature work.
Failure modes
- Unmeasurable requirements: "fast" and "scalable" cannot fail a review, so they never shape the design.
- Averages instead of percentiles: an average of 80 ms can hide a P99 of two seconds.
- Targets without load: latency measured on an idle system passes, then fails at the peak.
- Testing only the happy path: throughput is met with every server healthy, and the first failure at peak becomes an outage.
- Over-building: multi-region active-active for an internal tool with ten users. Cost and complexity without a requirement behind them.
- Requirements drift: traffic grows tenfold, but nobody re-checks the design against the new number until it breaks.
In production
Teams express non-functional requirements as SLOs (for example, 99.9% of requests under 300 ms over 30 days), measure them as SLIs from real traffic and alert on burn rate. Load tests check throughput and latency targets before launch and after big changes; failure tests (stopping instances, failing a zone) check availability targets. Architecture decision records link each significant component to the requirement that drove it, so it can be revisited when that requirement changes.
Common misconceptions
- "Non-functional means optional." They are often the hardest requirements to meet and the most expensive to retrofit.
- "If it works, the design is right." It works at today's load and with every component healthy. Correctness is relative to the targets and the failures you must survive.
- "More components make a better design." Each component should earn its place through a requirement; the rest is cost and operational risk.
- "Availability comes from the load balancer." The balancer only routes around failures; the survivors still need capacity for the whole load.
Interview angle
Start every design by asking for scope and numbers: core features, daily active users, read/write ratio, peak requests per second, latency target and percentile, availability target, data size and retention, consistency needs. Write them on the board. Then, as you add each component, say which requirement it serves ("two servers for the 150 req/s peak, a third so we survive one failure"). When the interviewer changes a number, re-check the design against it out loud. That habit is what separates a design from a diagram.
Model assumptions
The simulation is a simplified model, not a benchmark. Each app server has 8 workers with a lognormal service time of 50 ms mean (cv 0.3) and room for 30 waiting requests; a worker also waits for its database call, so it is tied up about 60 ms per request, roughly 125 req/s per server. The database has 10 connections, 7 ms reads and 15 ms writes; 20% of requests are writes. Users are 10 ms from the service, internal hops take 2 ms. Arrivals are random (Poisson). The load balancer uses least connections and probes every 500 ms (2 failures eject, 2 successes restore). Utilisation is the fraction of busy workers, not CPU. The targets (P95 < 200 ms, 150 req/s, survive one server loss) are illustrative.