Course map

Topic 016 / Core

Non-functional requirements and quality attributes: scalability, availability, reliability, latency, measurable acceptance criteria

Chapter 2.2 · Requirements

What and why

A system can do everything asked of it (functional) and still fail — too slow, down too often, data silently lost. Non-functional requirements (NFRs) state how well the system performs its functions: quality attributes such as scalability (handling more load by adding resources), availability (the fraction of time the system is usable), reliability (the probability of correct operation over a period), and latency (how fast a response arrives) — each written as a measurable acceptance criterion, a target someone could actually test, never a bare adjective. Builds on: → 15 — NFRs qualify the same functions topic 15 just listed.

Diagram

Attribute Definition Example measurable target
Scalability handle more load by adding resources handle 10× current QPS by adding instances, no code change
Availability fraction of time the system is usable 99.9% uptime (≈8.8 h downtime/year)
Reliability probability of correct operation over a period <0.1% of orders lost or duplicated per month
Latency time to respond p99 < 200 ms for the checkout API

How it works

  1. For each functional requirement, ask: how fast, how often available, how correct, under how much load?
  2. Turn the adjective into a number and a measurement window ("fast" → "p99 < 200 ms over a rolling 5-minute window").
  3. State availability as a percentage and translate it into a downtime budget so it's felt, not abstract (full availability math → 192).
  4. Track latency as p50 and p99 separately — tail latency often matters more than the mean (deep treatment → 100).
  5. Write each NFR so a test or a monitor (→ 203) could pass or fail it — if nobody could measure it, it isn't yet a requirement.

Practical example

(illustrative). "The checkout API must be fast" becomes: p50 < 100 ms, p99 < 300 ms, measured at the load balancer under normal and 3× peak load. "The system must be reliable" becomes: order loss rate < 0.01% per month, verified by reconciling order counts against payment records (→ 81). At a 99.95% availability target, the annual downtime budget is (1 − 0.9995) × 365 × 24 × 60 minutes = 262.8 minutes/year ≈ 4.4 hours — a number on-call can actually plan around.

When to use it

  • Use when: the system will have more than one user, or outlive a demo.
  • Avoid when: setting targets tighter than the business needs — five-nines availability for an internal reporting tool wastes engineering effort chasing a number nobody needed.
  • Failure scenarios: a feature that works in the demo falls over at 10× load because no scalability target was ever stated.
  • Simpler alternative: a true one-off script needs no formal NFRs — "runs in under a minute, correctness checked by eye" is enough.

Practice

(Process kind, with a classification check; 15–20 min, no lab services). Rewrite three vague quality claims — "the app should be reliable," "the search should be fast," "the system should scale" — as measurable acceptance criteria, each with a number and a measurement method. Then, for the availability target you chose, compute the annual downtime budget in hours. Done when every rewritten criterion could be checked by a monitor, not a feeling.

Key takeaway

Non-functional requirements turn quality attributes — scalability, availability, reliability, latency — into numbers someone can test, not adjectives. Done when you can convert any vague quality claim into a measurable target with a time window. Used next in → 19 (latency numbers), → 100 (latency/throughput detail), → 192 (availability math), → 203 (SLIs/SLOs).

References

AWS Well-Architected Framework — names six pillars for evaluating cloud architectures, a useful checklist of quality attributes; see references.md.

Source directory

Search the guide