Skip to content

Quality attributes and NFRs

Functional requirements say what a system does: “a customer can pay an invoice”. Quality attributes, often called non-functional requirements (NFRs), say how well it must do it: how fast, how reliably, how securely, at what scale and cost. They usually matter more to the architecture than the features do. Two systems with identical features can need completely different designs because one must handle ten users and the other ten million.

The trouble is that quality requirements usually arrive as adjectives. “The system must be fast, scalable and secure” can’t be designed for or tested. The architect’s job is to turn adjectives into scenarios with numbers.

Anatomy of a quality attribute scenario1. Who or what triggers the event, and what the event is, with a number. 2. Which part of the system is affected, under what conditions, and what it should do. 3. How success is measured, so the scenario can be tested.Environment: peak sale day Sourcecustomers on mobileStimulus5,000 checkouts a minute Artifactcheckout service Response measurep95 under 800 ms Responseorders confirmed123
Anatomy of a quality attribute scenario Each part is concrete, so the scenario can be designed for, tested and agreed with the business.
  1. Who or what triggers the event, and what the event is, with a number.
  2. Which part of the system is affected, under what conditions, and what it should do.
  3. How success is measured, so the scenario can be tested.

This six-part structure comes from the Software Engineering Institute’s work on architecture evaluation. You don’t need the formal names. You need every requirement to say who, what, where, under which conditions, and how much.

Vague wish Measurable scenario
“It must be fast” Under normal load, 95% of search requests return in under 300 ms
“It must be scalable” On peak sale day, checkout handles 5,000 orders per minute with p95 under 800 ms
“It must be highly available” Checkout is available 99.95% of each month, measured at the load balancer
“It must be secure” A user can only read their own invoices; verified by automated tests on every API
“It must recover from disasters” After a region failure, service is restored within 1 hour with no more than 5 minutes of data lost (RTO 1 h, RPO 5 min)
“It must be easy to change” Adding a new payment method takes one team under two weeks, without changes to the order service
“It must be affordable” Infrastructure cost stays under 2% of revenue processed

ISO/IEC 25010 provides a standard checklist. In practice, these come up most:

  • Performance efficiency: latency, throughput, resource use.
  • Reliability: availability, fault tolerance, recoverability.
  • Security: confidentiality, integrity, accountability, authenticity.
  • Maintainability: modularity, testability, ease of change.
  • Scalability: behavior as load, data or users grow.
  • Operability and observability: can it be deployed, monitored and fixed easily?
  • Cost: to build, to run, and to change.
  • Compliance: regulatory and audit requirements, data residency.
  • Usability and accessibility: for example, WCAG conformance.
  1. Gather scenarios in a workshop with business, operations and security, not just from a document.
  2. Prioritize. Ask “how important to the business?” and “how hard to achieve?” The scenarios that are both important and hard drive the architecture. The SEI calls them architecturally significant requirements.
  3. Design for the top scenarios explicitly, and record the decisions in architecture decision records.
  4. Test them: load tests for performance, game days for recovery, automated checks for security.
  5. Monitor them in production as service level objectives (see observability).
  • Clear targets for design, testing and acceptance.
  • Honest conversations about cost: “four nines” has a price the business can now see.
  • Better trade-offs, because priorities are explicit.
  • Takes time with stakeholders who’d rather talk about features.
  • Numbers can be guesses early on, and need revisiting.
  • Long lists of scenarios can hide the few that matter.

On every system worth designing deliberately, and especially before choosing an architecture style, a cloud design or a vendor product.

Don’t write formal scenarios for throwaway prototypes. But even then, write down the one or two numbers that would make the prototype a failure.

  • Copying last project’s NFR document, full of numbers nobody here agreed to.
  • “100% availability” or “infinitely scalable”: requirements that can’t be met or tested.
  • NFRs owned by nobody, so they’re dropped when the deadline arrives.
  • Measuring averages instead of percentiles; the average hides the slow requests users actually complain about.

Glossary: non-functional requirements

Written and edited by Abhinav Taduka, enterprise software architect.