Sub topic 13
Maintainability and operability requirements
This chapter assumes you can write measurable non-functional requirements (NFRs) with SLIs and SLOs, and that you know what a deploy, a log and an alert are. Maintainability and operability are the qualities that decide how much it costs to keep a system running and changing after launch.
Two qualities, two audiences
Maintainability is how easily engineers can change the system. Operability is how easily on-call staff can run it and diagnose it when it breaks. Users never see either quality directly. They see the effects: slow feature delivery, long outages and repeated incidents.
A weak requirement says "the system should be easy to maintain". Nobody can test that. Write a target with a number and a way to measure it.
| Quality | Vague wording | Measurable wording |
|---|---|---|
| Deployability | Deploys should be easy | A change reaches production within 30 minutes of merge, with no manual steps |
| Recoverability | Recover quickly | A bad release is rolled back in under 10 minutes |
| Observability | Good monitoring | Every request is traceable by ID across all services, and logs are searchable within 60 seconds |
| Testability | Well tested | Unit tests cover 80% of changed lines, and the main flows have automated end-to-end tests |
| Diagnosability | Easy to debug | 90% of incidents are diagnosed from dashboards and logs, with no production access needed |
Typical operability requirements
- Observability: metrics for each SLI, structured logs and request tracing.
- Alerting: alerts fire on SLO burn, not on every error. Each alert links to a runbook.
- Deployment: automated, repeatable releases with canary or staged rollout and a fast rollback.
- Configuration: settings and feature flags change without a rebuild.
- Backup and restore: a restore is tested on a schedule, with a stated recovery time.
- Upgrades: the system can be patched without downtime.
Writing them down
Add these items to the same requirements document you use for other NFRs, with IDs, so they can be traced and tested.
non_functional:
- id: NFR-4
quality: deployability
text: A merged change reaches production in under 30 minutes with zero manual steps.
- id: NFR-5
quality: operability
text: A faulty release is rolled back in under 10 minutes, measured from the decision to roll back.
- id: NFR-6
quality: observability
text: Every redirect request carries a trace ID that appears in the logs of every service it touches.Why this affects design
These requirements shape architecture. A rollback target pushes you toward immutable builds and backward-compatible database changes. A tracing requirement means every service must pass the trace ID along. Zero-downtime upgrades rule out designs where one node holds state that cannot move.
Common errors
- Writing "maintainable" with no measure.
- Setting alerts on causes such as CPU use instead of on user-facing SLOs.
- Leaving operability until after launch, when adding tracing means touching every service.
- Forgetting the cost: more observability means more storage and more engineering time, which links to the trade-offs chapter.
Exercise
Rewrite "the service should be easy to monitor" as a measurable requirement. Name what is measured and the target.
Show answer
One valid answer: "Every request is assigned a trace ID, and 95% of production errors can be located from logs and traces within 5 minutes of an alert." It names the thing measured (time to locate an error), a percentage and a time limit, so it can be tested.
Exercise
Why is "alert when CPU exceeds 80%" a weak operability requirement?
Show answer
CPU is a cause, not a user-facing symptom. High CPU may cause no user harm, and users can be hurt while CPU is normal. Alerts tied to SLOs, such as a high error rate or slow redirects, page people only when users are affected.