Sub topic 19
Common Mistakes and How to Avoid Them
This chapter assumes you know the difference between functional and non-functional requirements. It also assumes you can read SLIs, SLOs and percentiles, and can do the back-of-envelope load arithmetic from earlier chapters. Here you will see the errors that most often weaken a requirements document, how to spot each one in review, and how to fix it.
Mistakes in how requirements are written
Vague quality words
"The system must be fast, scalable and highly available" cannot be tested. Two engineers will read it differently, and no one can say whether the finished system meets it.
A usable non-functional requirement names four things:
- the quality, such as latency or availability
- a number, with a unit
- a statistic, such as a percentile or a success ratio
- a measurement point and a window
Compare the two forms:
- Weak: "Redirects must be fast."
- Strong: "99% of redirects complete in under 100 ms, measured at the service edge over 30 days."
A small script can catch the worst offenders before a human review. It is crude and will not replace a reviewer, but it makes the habit visible.
import re
VAGUE_WORDS = ("fast", "reliable", "scalable", "secure", "user-friendly")
MEASURE = re.compile(r"\d+(\.\d+)?\s*(%|ms|seconds|minutes|rps)")
def lint(text):
"""Return a list of problems found in one non-functional requirement."""
lowered = text.lower()
problems = [f"vague word '{w}'" for w in VAGUE_WORDS if w in lowered]
if not MEASURE.search(lowered):
problems.append("no measurable number")
return problems
requirements = {
"NFR-1": "The service must be fast and scalable.",
"NFR-2": "99% of redirects complete in under 100 ms, measured at the service edge over 30 days.",
}
for req_id, text in requirements.items():
print(req_id, lint(text) or "ok")
# NFR-1 ["vague word 'fast'", "vague word 'scalable'", 'no measurable number']
# NFR-2 okWriting solutions instead of requirements
"Use Redis to cache redirects" is a design decision, not a requirement. It hides the need behind a technology. If the real need is "99% of redirects under 100 ms", a different design, such as a CDN or an in-process cache, might satisfy it. Keep the requirement about the outcome and let the design chapter choose the mechanism.
A quick test: if you can swap the technology and the requirement still makes sense, it is probably a requirement. If it names a product, it is probably a design choice.
Leaving out scope and assumptions
Requirements that list only what is in scope invite arguments later. Record three things explicitly:
- out-of-scope items, such as "Click analytics" in the URL shortener
- assumptions, such as "10 million daily active users, 20 requests each"
- constraints, such as "must run on the existing cloud account"
An unstated assumption becomes a surprise during load testing. A stated one can be challenged on day one.
Mistakes in the numbers
Using averages where percentiles belong
A mean hides the slow tail. In the earlier sample of ten latencies, the median was 20 ms while the 99th percentile was 250 ms. A target of "average latency under 50 ms" would pass while one request in ten might be many times slower. State latency targets as percentiles, and say which one.
Setting targets without a window or a budget
"99.9% availability" means nothing until you give the window. Over 30 days it allows about 43.2 minutes of downtime, and 99.99% allows about 4.3 minutes. Convert each target into a budget and ask whether the team can really operate within it. A four-minute budget cannot survive a single manual failover.
Sizing for the average
Dividing daily requests by 86,400 gives an average rate of about 2,315 requests per second for 10 million users making 20 requests each. Traffic is not flat. With a peak factor of 3, you must size for roughly 6,944 requests per second. Always state the peak factor as an assumption, and write down where it came from.
Confusing SLO and SLA
An SLO is an internal target. An SLA is a contract with consequences, often a refund. If the SLO equals the SLA, the first breach of your own target is already a contract violation. Set the SLO stricter than the SLA so you have time to react.
Mistakes in how requirements interact
Ignoring conflicts
Strong consistency, low latency and availability across regions pull against each other. A document that demands all three at maximum has not made a decision. For each pair that conflicts, record which requirement wins and under what condition. For example: "Reads may be up to 5 seconds stale during a regional failure; writes are never acknowledged before they are durable."
Gold-plating
Not every feature needs the same quality. An internal admin page does not need the redirect path's 99.9% target. Assign targets per user journey, not per system. Every extra nine costs engineering effort and money, and it also adds operational complexity.
Mixing up durability and availability
Availability is whether the service answers right now. Durability is whether acknowledged data survives. A service can be down and lose nothing, or be up and silently lose writes. Write separate requirements for each, as the URL shortener does with NFR-2 and NFR-3.
A review checklist
Run each requirement through the same sequence of questions before you accept it.
Summary table
| Mistake | Symptom in review | Fix |
|---|---|---|
| Vague quality word | "Fast", "scalable" with no number | Add number, percentile, window, measurement point |
| Solution as requirement | A product name in the requirement | Rewrite as the outcome it must achieve |
| Missing scope | Debates about features nobody listed | Record out-of-scope items and assumptions |
| Averages for latency | "Mean under 50 ms" | Use p95 or p99 targets |
| No downtime budget | "Five nines" without cost discussion | Convert to minutes per window |
| Sizing for average | No peak factor in estimates | State a peak factor and its source |
| SLO equals SLA | No margin before contract breach | Make the SLO stricter than the SLA |
| Unresolved conflict | All qualities at maximum | Record which requirement wins and when |
| Durability and availability merged | One "reliable" requirement | Write them as separate requirements |
Exercise
A draft says "The API must respond quickly using a Redis cache, with five nines of availability." List the mistakes and rewrite it for a service whose users tolerate 200 ms.
Show answer
The draft has three problems. "Quickly" is vague. "Using a Redis cache" is a solution, not a requirement. "Five nines" gives no window, and it allows only about 26 seconds of downtime in 30 days, which is rarely justified. A rewrite: "99% of API responses complete in under 200 ms, measured at the load balancer over 30 days" and "The API returns a non-error response for 99.9% of requests over a 30-day window." Whether to use Redis is left to the design.
Exercise
A team sets an SLA of 99.9% monthly availability and an internal SLO of 99.9%. Why is this risky, and what would you change?
Show answer
With no margin, the first month in which the team misses its own SLO also breaches the contract and triggers penalties. Set the SLO tighter than the SLA, for example 99.95%, so alerts and error-budget policy act before the contractual threshold is crossed.