When Daniel says he wants a platform that is "fast, never goes down, and can handle the growth," he is expressing real needs, but nothing can be designed from them. Is fast one second or one hundred milliseconds? Never going down, or no more than one hour a month? The difference between one answer and the other can multiply the cost by ten and completely change the architecture. Non-functional requirements are, in fact, the ones that most shape the structure of a system. In this lesson you will learn to tell them apart from functional requirements, get to know the main quality attributes, turn them into verifiable figures, and prioritize them with the business. We will finish with the table of non-functional requirements for the Rutaverde platform, which will be the reference for the rest of the course.

Contents

  1. Functional and non-functional requirements
  2. Quality attributes
  3. How to make them measurable: quality attribute scenarios
  4. SLI, SLO, and SLA
  5. The table of availability nines
  6. Prioritizing with the business: the workshop with Daniel
  7. Non-functional requirements of the Rutaverde platform

  1. Functional and non-functional requirements

  • A functional requirement describes what the system does: a function, a behavior, a business rule.
  • A non-functional requirement (NFR) describes how well it does it: how fast, how reliably, how securely, at what cost.
Functional requirement Associated non-functional requirement
A merchant can create a shipment through the API 95% of creations respond in under 300 ms
A recipient can check the status of their package The query is available 99.9% of the time
A courier can confirm a delivery with a photo Confirmation works even with no coverage for 15 minutes
Administration can issue the monthly invoice Only authorized staff can see billing data

Two ideas explain why non-functional requirements matter so much to an architect:

  • Functional requirements rarely shape the structure. Almost any architecture can create a shipment. Very few can create 50 per second without interruptions.
  • Non-functional requirements cannot be added at the end. A missing feature can be programmed later. A system that does not scale has to be redesigned.

A note on vocabulary: some authors prefer to talk about "quality requirements," because "non-functional" sounds secondary. We will use both terms as synonyms.

  1. Quality attributes

A quality attribute is a measurable property of the system that indicates the degree to which it satisfies a need. Non-functional requirements are specific demands on those attributes.

The ISO/IEC 25010 standard offers a reference catalog. Its most widely used version defines eight characteristics: functional suitability, performance efficiency, compatibility, usability, reliability, security, maintainability, and portability, each with sub-characteristics. There is no need to memorize it; its usefulness is as a checklist so that no family is forgotten.

In this course we will work with eight attributes, the most relevant ones for technological architecture:

Attribute Question it answers Common measures Where it is covered in the course
Performance How long does it take to respond? Latency in percentiles, requests per second Modules 2 and 4
Scalability Can it handle more load by adding resources? Maximum load supported, time to add capacity Module 2
Availability What portion of the time is it operational? Percentage of time in service Module 2
Security Does it protect confidentiality, integrity, and access? Controls in place, open vulnerabilities Module 3
Maintainability How much does it cost to change? Deployment frequency, lead time for a change Modules 4 and 5
Observability Can you tell what is happening inside it? Time to detect an incident Module 4
Cost How much does it cost to build and operate? Monthly cost, cost per business unit Module 4
Portability How much does it cost to move it to another platform or provider? Estimated migration effort Modules 3 and 5

A note on percentiles

Performance is not measured with the average, because the average hides the users who have the worst time. Percentiles are used instead:

  • p50 (the median): half of the requests take less than that value.
  • p95: 95% of the requests take less; 1 in 20 takes longer.
  • p99: only 1 in 100 takes longer.

If the average is 200 ms but the p99 is 6 seconds, one in every hundred users has a terrible experience, and with 40,000 shipments a day that means hundreds of people. That is why performance requirements are expressed as p95 or p99.

  1. How to make them measurable: quality attribute scenarios

"The system must be fast" cannot be verified. A useful non-functional requirement must be verifiable with a test. The most widespread technique for achieving this is the quality attribute scenario, which forces you to pin down four elements:

Element What it describes Guiding question
Stimulus The event that puts the system to the test What happens?
Environment The conditions under which it happens In what situation?
Response What the system must do How does it react?
Measure The numeric success criterion How do we know it has done it well?

Some variants of the technique add the source of the stimulus (who causes it) and the affected artifact (which part of the system); here we will fold them into the description when they add something.

Let's look at the transformation of a vague requirement into a scenario. Starting point: "shipment creation must be fast even on Black Friday."

id: SC-01
attribute: performance
stimulus: Merchants send 50 shipment creation requests per second through the API
environment: Black Friday peak, platform operating normally
response: The platform registers each shipment and returns its tracking code
measure: 95% of requests respond in under 300 ms and none is lost

Let's analyze each line:

  • id makes it possible to cite the scenario in meetings and documents.
  • attribute classifies it: this is a performance scenario.
  • stimulus quantifies the load. It is no longer "a lot"; it is 50 requests per second.
  • environment sets the conditions. Demanding this time on a normal day is not the same as demanding it in the middle of peak season, nor is demanding it with everything working the same as with a server down.
  • response says what must happen functionally.
  • measure is what turns the wish into something verifiable: a load test can be set up to say whether it is met or not.

A second example, this time for availability:

id: SC-02
attribute: availability
stimulus: The server running the application fails
environment: Delivery hours, normal load
response: Traffic is redirected to another instance without human intervention
measure: Service is restored in under 60 seconds and no confirmed delivery is lost

Compare it with RouteManager's current situation: manual activation of the standby in about 40 minutes. The scenario does not say how to achieve it (that is design, and we will see it in Module 2); it says what result is required.

  1. SLI, SLO, and SLA

Three widely used acronyms bring order to the way a service's quality is measured and committed to:

Acronym Meaning What it is Example at Rutaverde
SLI Service level indicator An actual measure of the service's behavior Percentage of requests to the shipments API answered correctly
SLO Service level objective The value we set ourselves for an indicator, internally 99.9% of requests correct each month
SLA Service level agreement A contractual commitment to the customer, with consequences if it is breached 99.5% monthly; below that, 5% is discounted from the month's invoice

The relationship between them is:

flowchart LR
    SLI["SLI: what we measure"] -->|"is compared with"| SLO["SLO: what we aim for"]
    SLO -->|"is stricter than"| SLA["SLA: what we promise by contract"]

Two practical rules:

  • The SLO must be stricter than the SLA. Rutaverde promises 99.5% to its merchants and sets itself an internal target of 99.9%. That margin makes it possible to detect and correct problems before breaching the contract.
  • Without an SLI there is no SLO. An objective that is not measured is an intention. Today RouteManager measures almost nothing: its 99.2% availability was calculated after the fact by adding up incidents noted down by hand.

A very useful derived concept is the error budget: the amount of failure the objective allows. With a 99.9% SLO, the budget is the remaining 0.1%. As long as there is budget left, risks can be taken, such as deploying new features. If it runs out, stability becomes the priority.

  1. The table of availability nines

Availability is expressed as the percentage of time the service is working. The usual values are named by their number of nines: 99.9% is "three nines." The formula is:

availability = time in service / total time
allowed downtime = total time × (1 − availability)

Percentages fool our intuition: 99% sounds excellent, but it allows more than seven hours of downtime a month. A small Python program makes this clear:

MINUTES_PER_MONTH = 30 * 24 * 60   # 43,200 minutes in a 30-day month
HOURS_PER_YEAR = 365 * 24          # 8,760 hours in a year

targets = [99.0, 99.5, 99.9, 99.95, 99.99, 99.999]

for target in targets:
    downtime_fraction = 1 - target / 100
    minutes_month = MINUTES_PER_MONTH * downtime_fraction
    hours_year = HOURS_PER_YEAR * downtime_fraction
    print(f"{target}%: {minutes_month:.2f} min/month, {hours_year:.2f} h/year")

Step-by-step explanation:

  • The first two lines calculate the total reference time: the minutes in a 30-day month and the hours in a year.
  • targets is the list of availability levels we want to compare.
  • The for loop goes through the list. For each target, downtime_fraction converts the percentage into the fraction of time the service can be down: for 99.9, it is 1 - 0.999 = 0.001.
  • Multiplying that fraction by the total time gives the allowed downtime.
  • print shows the result with two decimal places.

The program's output is:

99.0%: 432.00 min/month, 87.60 h/year
99.5%: 216.00 min/month, 43.80 h/year
99.9%: 43.20 min/month, 8.76 h/year
99.95%: 21.60 min/month, 4.38 h/year
99.99%: 4.32 min/month, 0.88 h/year
99.999%: 0.43 min/month, 0.09 h/year

Arranged in a table:

Availability Name Allowed downtime per month Allowed downtime per year
99% Two nines 7 h 12 min 3.65 days
99.5% 3 h 36 min 43.8 hours
99.9% Three nines 43.2 min 8.76 hours
99.95% 21.6 min 4.38 hours
99.99% Four nines 4.32 min 52.6 min
99.999% Five nines 26 seconds 5.26 min

Three important takeaways from this table:

  • Each additional nine divides the margin by ten and usually multiplies the cost: it requires redundancy, automation, and on-call teams.
  • Beyond a certain point, humans cannot keep up. With 4.32 minutes a month there is no time for a person to receive the alert, log in, and act. Recovery must be automatic.
  • RouteManager is at around 99.2%, about 70 hours of unavailability a year. Its 2-hour monthly deployment alone already consumes 120 minutes a month, almost three times what a 99.9% objective allows. Reaching three nines means, before anything else, deploying without downtime.

  1. Prioritizing with the business: the workshop with Daniel

Quality attributes compete with one another and all of them cost money. You cannot maximize everything, so you have to prioritize, and that priority is not decided by the architect: it is decided by the business, with the information the architect provides.

Marta organizes a two-hour workshop with Daniel, Íñigo, and Clara. The method has four steps:

  1. List the candidate scenarios based on the business goals and past incidents.
  2. Put a price on non-compliance: what does the business lose if this scenario is not met?
  3. Estimate the difficulty of meeting it: low, medium, or high.
  4. Rank: first whatever has a large impact on the business, and within that, keep a close eye on whatever is also difficult, because that is what shapes the architecture the most.

The most revealing moment of the workshop comes early. Daniel asks for 100% availability. Marta shows him the table of nines and suggests translating it into money. With 40,000 shipments a day and an average revenue of €3.50 per shipment, Rutaverde brings in about €140,000 a day. Shipment creation is concentrated in about ten hours, so one hour of downtime during that window puts about €14,000 at risk, and in peak season, five times more. With those numbers, Daniel can compare what each availability level costs with what it protects. The shared conclusion is that three nines are enough for the critical functions and that not every function is critical.

The second agreement is to differentiate by function. It makes no sense to demand the same of shipment creation as of the administration reports:

Function Criticality Reason
Shipment creation through the portal and API Critical If it fails, the merchant cannot work and the revenue is lost
Tracking Critical It is the visible face to the recipient; when it goes down, calls to customer support soar
Delivery operations with the app Critical during delivery hours Without it, 280 couriers come to a halt
Notifications Important A delay of minutes is acceptable, but loss is not
Billing and reports Normal Internal use; planned interruptions are acceptable

The outcome of the workshop is this order of priorities:

Priority Attribute Reason given by the business
1 Availability of the critical functions The two lost customers left because of the outages
2 Scalability The 20-city plan and the peak seasons
3 Performance Merchants integrate the API into their online stores
4 Maintainability One deployment a month does not let us compete
5 Observability Today it is the customers who detect the problems
6 Cost It must grow more slowly than shipment volume
7 Portability Desirable, but not at any price

Security is left off the list at Clara's suggestion, and rightly so: it is not an attribute that can be traded down in exchange for another, but a mandatory minimum, partly imposed by law. It is treated as a constraint that every design must satisfy.

  1. Non-functional requirements of the Rutaverde platform

Before the table, let's see where the capacity figures come from.

  • Target volume. Today there are 40,000 shipments a day in 6 cities. With 20 cities and the expected growth, the business sets the target at 200,000 shipments a day, with peak-season spikes of ×5, that is, up to 1,000,000 shipments a day.
  • Shipment creation. One million shipments in a day is equivalent to an average of about 12 per second. But the load is not uniform: it is concentrated in certain hours, with spikes of about four times the average. That is where the target of 50 creations per second comes from.
  • Tracking queries. With about 4 queries per shipment, one million shipments generate 4 million queries a day, about 46 per second on average. With spikes of about five times the average, the target is 250 queries per second.

And this is the reference table. We will cite it by identifier throughout the course:

Id Attribute Requirement Measure Current situation
NFR-01 Availability Shipment creation (portal and API) and tracking 99.9% monthly, with no exclusion for maintenance Around 99.2%
NFR-02 Availability Delivery operations with the app 99.9% between 06:00 and 22:00; the app keeps operating for 15 minutes offline No offline operation
NFR-03 Availability Billing, reports, and back-office screens 99.5% monthly Around 99.2%
NFR-04 Performance Shipments API p95 under 300 ms and p99 under 1 s p95 of about 900 ms; more than 5 s at peaks
NFR-05 Performance Tracking page p95 under 500 ms More than 8 s at peaks
NFR-06 Capacity Sustained volume 200,000 shipments a day 40,000 shipments a day
NFR-07 Scalability Peak-season spikes ×5 over the sustained volume: 50 creations and 250 tracking queries per second Degradation and outages at 200,000 shipments a day
NFR-08 Scalability Elasticity Add or remove capacity in under 10 minutes and without downtime Weeks, buying hardware
NFR-09 Security Protection of data and access Encryption in transit and at rest for personal data; least privilege; GDPR compliance Single database user; consecutive tracking codes
NFR-10 Maintainability Delivery of changes At least one deployment a week, with no service downtime One deployment a month with 2 hours of downtime
NFR-11 Observability Incident detection Automatic detection in under 5 minutes Users detect them
NFR-12 Cost Infrastructure per shipment No more than €0.02 per shipment About €0.025 per shipment
NFR-13 Portability Provider dependence In-house components are packaged in standard formats and do not depend on services exclusive to one provider without a recorded decision Not applicable: own data center
NFR-14 Recovery RPO and RTO objectives To be defined with the business Nightly backup in the same data center

Some clarifications about the table:

  • NFR-01 does not exclude maintenance. This is a deliberate decision: the recipient does not care whether the outage was planned.
  • NFR-12 starts from the current cost: the infrastructure costs about €365,000 a year for 14.6 million shipments a year, that is, about €0.025 per shipment. The goal is for growth to lower the unit cost, not raise it.
  • NFR-14 mentions two new acronyms. The RPO indicates how much data can be lost at most in a disaster, measured in time; the RTO, how long it can take to recover the service. Their values will be set in Module 4, when we cover business continuity.
  • The current-situation column turns the table into a gap map: it shows at a glance where the greatest distance lies between what exists and what is needed.

Common Mistakes and Tips

  • Requirements without a number. "High availability" or "reasonable times" can be neither designed nor verified. If it has no measure, it is not a requirement.
  • Asking for the maximum in everything. Demanding five nines, 50 ms, and minimum cost all at once is failing to prioritize. Every demand has a price and must be justified.
  • Using the average for performance. It hides precisely the cases that generate complaints. Use p95 and p99.
  • Applying the same level to the whole system. Differentiating by function, as the workshop did, saves a great deal of money and complexity.
  • Having the architect invent the requirements. The figures must come from the business; the architect helps formulate them and explains their cost.
  • Forgetting the scenario's environment. A response time with no indication of the load under which it is measured means nothing.
  • Tip: when someone asks for a very demanding requirement, ask "what happens if it is not met?" The answer usually reveals the level that is really needed.

Exercises

Exercise 1

Classify each requirement as functional or non-functional. For the non-functional ones, state the quality attribute and say whether it is well formulated, that is, whether it is measurable:

  1. The recipient can change the delivery time slot from the tracking page.
  2. The platform must be very secure.
  3. 99% of delivery confirmations are recorded in under 1 second with 280 active couriers.
  4. The merchant can download its invoices as PDFs.
  5. Adding a new city must not require more than one day of configuration work.

Exercise 2

Write a quality attribute scenario, with its four elements, for this wish of Daniel's: "that a flood of people checking where their package is doesn't take down shipment creation."

Exercise 3

The availability SLO for tracking is 99.9% monthly, with 30-day months.

  1. What is the monthly error budget in minutes?
  2. On the 10th there is a 25-minute outage. How much budget is left?
  3. The team wants to do a deployment on the 20th that requires 30 minutes of downtime. What would you recommend?

Solutions

Solution 1

  1. Functional. It describes something the system does.
  2. Non-functional, security, but poorly formulated: "very secure" is not measurable. It would have to be pinned down in verifiable controls, as in NFR-09.
  3. Non-functional, performance, and well formulated: it has a measure (1 second at the p99) and an environment (280 active couriers).
  4. Functional.
  5. Non-functional, maintainability, specifically ease of change, and well formulated: it is verifiable. It elaborates on Rutaverde's principle P5.

Solution 2

One valid answer:

id: SC-03
attribute: availability and performance, isolation between functions
stimulus: Tracking queries rise to 250 per second for one hour
environment: Christmas peak, with merchants creating 50 shipments per second
response: The platform serves the tracking queries without affecting shipment creation
measure: >
  The shipments API keeps its p95 below 300 ms and does not
  reject any request; tracking keeps its p95
  below 500 ms

The essential point is that the measure talks about the function you want to protect, shipment creation, and not only about the one receiving the flood. This scenario is one of the strongest arguments for extracting Tracking as an independent service.

Solution 3

  1. A 30-day month has 43,200 minutes. 0.1% of that is 43.2 minutes.
  2. What is left is 43.2 − 25 = 18.2 minutes.
  3. The deployment would consume 30 minutes and only 18.2 are left: the SLO would be breached. The options are to postpone it to the following month, to reduce the downtime to under 18 minutes (leaving no margin for any other incident), or, better, to invest in being able to deploy without downtime, as NFR-10 requires. The case illustrates what the error budget is for: it turns a debate of opinions into a data-driven decision.

Conclusion

Non-functional requirements express how well a system must behave, and they are what really determines its architecture. We have seen the eight main quality attributes, the scenario technique for turning vague wishes into verifiable demands, the difference between what is measured, what is aimed for, and what is promised by contract, and what each availability nine really means. With the prioritization workshop, the business has set the order of importance, and the table from NFR-01 to NFR-14 finally gives us a quantified destination: 99.9% availability for what is critical, a p95 under 300 ms for the API, and 200,000 shipments a day with ×5 spikes. However, these requirements compete with one another: more availability costs more money, and more portability limits the use of managed services. Choosing between options that favor some attributes and hurt others, and recording why the choice was made, is the subject of the last lesson of the module.

© Copyright 2026. All rights reserved