architecture · advanced

Quality-Attribute Scenarios

Quick answer

A quality-attribute scenario specifies a stimulus, environment, artifact, response, and measure for a non-functional concern (availability, latency, security, modifiability, cost). Staff architects use scenarios so “make it scalable” becomes something you can review, test, and refuse.

Why this matters

Learning objectives

  1. Write a complete quality-attribute scenario.
  2. Cover common attributes without boiling the ocean.
  3. Use scenarios in reviews and ADRs.
  4. Spot fake measures (“highly available”).
  5. Prioritize scenarios by risk.

Explain like I am 5

Instead of “be strong,” say: “If a big kid pushes the tower, it can wobble but must not fall for 10 seconds.”

Mental model

flowchart LR
  Stimulus --> System
  Environment --> System
  System --> Response
  Response --> Measure
PartExample (availability)
SourceLoad balancer health check
StimulusPrimary region network partition
EnvironmentPeak traffic, degraded mode allowed
ArtifactCheckout API
ResponseFail over to secondary within 60s
MeasureError rate < 1% during fail over; RTO ≤ 60s

Core concepts

Attributes are plural

You never optimize one attribute alone. Latency, cost, security, and modifiability compete. Scenarios make the competition explicit.

Stimulus must be realistic

“Server dies” is better than “chaos.” Prefer production-shaped faults: dependency timeout, traffic spike, bad deploy, certificate expiry.

Response + measure

Without a measure, you have a wish. Prefer numeric SLOs, error budgets, or pass/fail checks in a game day.

Prioritize

10 scenarios beat 200 unused ones. Rank by business risk and likelihood.

Feed reviews and tests

Architecture reviews walk scenarios. Chaos/game days exercise them. ADRs cite them as constraints.

Worked example

Modifiability scenario

This scenario kills “big bang rewrite” options early.

Trade-offs

Too many scenariosNo scenarios
Analysis paralysisHand-wavy reviews
Clear test planUnverifiable claims

Failure modes

ModeMitigation
“Highly scalable” proseForce a measure
Lab-only stimuliUse production incidents as sources
Orphan scenariosLink to SLOs and reviews
Attribute silosExplicit trade-off tables

Interview mode

Skeleton: “I express non-functionals as quality-attribute scenarios—stimulus, environment, response, measure—so architecture choices and reviews are testable, not slogans.”

Knowledge check

A realistic stimulus and a measurable response

A single adjective like “scalable”

Only a list of technologies

A full UI mock only

Related

By Shubham Jain

All articles

Shubham Jain · Learning Lab