Non-Functional Requirements
Lesson 3Beginner1h 8mAssessment-backed

Non-Functional Requirements

Learn how latency, throughput, availability, durability, consistency, security, cost, and observability become measurable system design targets.

What you will be able to do

Explain the most important non-functional requirements in practical language.
Turn vague words like fast and reliable into measurable targets.
Understand p95 latency, throughput, availability, durability, and consistency at a beginner level.
Connect NFRs to AWS, GCP, and Azure architecture choices.
Use NFRs to evaluate whether a design is production-ready.

Functional requirements say what the system does. Non-functional requirements say how well the system must do it. In production, these quality targets often decide the architecture more than the feature itself.

Why NFRs Matter

Two systems can support the same feature but require very different designs. A private admin tool that can be slow, a payment service that must be correct, and a live chat product that must feel instant all have different non-functional requirements.

Non-functional requirements dashboard
NFRs convert vague quality goals into measurable engineering targets.
Vague phraseBetter NFRWhy it is better
Fastp95 API latency below 200 ms for create requestsNames the operation, percentile, and target.
Highly available99.9% monthly availability for order status readsDefines the user-facing flow and time window.
Never lose dataAccepted payment events must be durably stored before acknowledgementDefines when durability is required.
ScalableHandle 5,000 writes/sec for 30 minutes during campaign peaksStates load and duration.
SecureTenant data must be isolated and all privileged actions auditedConnects security to real access rules.

Latency and Percentiles

Latency is how long an operation takes. In system design, average latency is often misleading because users feel the slow requests. That is why teams commonly discuss p95 or p99 latency: the request time below which 95% or 99% of requests complete.

MetricBeginner meaningExample
Average latencyTypical time across all requestsAverage status read is 80 ms.
p95 latency95 out of 100 requests are this fast or fasterp95 status read is below 250 ms.
p99 latency99 out of 100 requests are this fast or fasterp99 status read is below 800 ms.
Tail latencyThe slowest slice of user experienceSome users see multi-second delays during cache misses.

Design principle

Do not say the system should be fast. Say which operation should be fast, for whom, at which percentile, under what traffic level.

Availability, Durability, and Recovery

Availability means users can successfully use a system when they need it. Durability means accepted data is not lost. Recovery defines how quickly the system should return after failure and how much data loss is acceptable.

TargetQuestion it answersExample
AvailabilityCan users use it?Order status reads should be available 99.9% monthly.
DurabilityCan accepted data be lost?Confirmed order transitions must survive process crashes.
RTOHow long can recovery take?Restore service within 30 minutes after region-level incident.
RPOHow much data loss is acceptable?At most 1 minute of analytics events may be replayed or delayed.

Scenario: Payment Receipt Service

A payment receipt service receives a payment event, stores the receipt, emails the customer, and exposes receipt history. The feature sounds small, but the NFRs decide the design.

Payment receipt service with different non-functional requirements
A payment system separates immediate correctness from background delivery and reporting.
Part of systemNFRArchitecture implication
Payment event ingestionDo not acknowledge until receipt event is durably storedDurable database or log before response.
Receipt read APIp95 below 200 ms for recent receiptsIndexes, cache, and small read model.
Email deliveryCan be delayed, must retry safelyQueue plus idempotent worker.
Audit historyImmutable records for complianceAppend-only records and access logs.
Analytics dashboardCan lag by minutesAsync pipeline instead of slowing the payment path.

Consistency as an NFR

Consistency is not one universal setting. Ask what must be correct immediately and what can become correct after a short delay. A payment confirmation and a dashboard counter do not need the same consistency.

DataConsistency needReason
Payment receiptStrong enough to prevent missing confirmed receiptsUser trust and compliance.
Unread notification countCan be eventually consistentSmall delay is acceptable.
Inventory checkoutMust prevent overselling for scarce itemsBusiness correctness.
Analytics chartCan lag by minutesReporting is not on the critical user path.

Cloud Mapping for NFRs

Once NFRs are clear, cloud choices become easier. Managed services can reduce operational load, but they still must satisfy latency, durability, availability, compliance, cost, and team constraints.

NFR pressureAWS examplesGCP examplesAzure examples
High availability computeECS/EKS across AZs, LambdaCloud Run/GKE across zonesContainer Apps/AKS across zones
Durable relational dataRDS/Aurora Multi-AZCloud SQL HA/SpannerAzure SQL zone redundancy
Async retryable workSQS + DLQPub/Sub + dead-letter topicService Bus + dead-letter queue
Low-latency cacheElastiCacheMemorystoreAzure Cache for Redis
ObservabilityCloudWatch/X-RayCloud Monitoring/TraceAzure Monitor/Application Insights

NFR Brief Template

For each important user flow, define a small set of measurable quality targets. Avoid trying to make every part of the system perfect.

FlowLatencyAvailabilityDurability/consistencyNotes
Create payment receiptp95 below 300 ms99.95%Durable before ackCritical path.
Send receipt emailWithin 2 minutes99.9%Retry without duplicatesAsync path.
View receipt historyp95 below 250 ms99.9%Read-your-own receipt preferredIndexes/cache may help.
Analytics dashboardCan lag 5 minutes99%Eventually consistentDo not slow critical path.

Beginner Mistakes

  • Saying reliable without defining availability, durability, or recovery.
  • Using average latency when p95 or p99 matters more to users.
  • Making every operation strongly consistent without asking if the product needs it.
  • Adding queues and caches before identifying the slow or failure-prone path.
  • Ignoring cost and team support capacity as real non-functional requirements.

Guided Practice

Practice task

Pick a ride-sharing app. Define one latency target, one durability target, one availability target, one consistency target, and one cost or team constraint.

Sample Answer

NFRExample answer
LatencyDriver location on the customer map should refresh within 5 seconds for active trips.
DurabilityTrip start, trip end, fare, and payment events must not be lost after acknowledgement.
AvailabilityCustomers should be able to view active trip status with 99.9% monthly availability.
ConsistencyFare and payment state must be correct; map location can be eventually consistent.
Cost/teamUse managed queues and databases for launch because the team cannot operate custom distributed infrastructure yet.

Before You Continue

  • You should be able to turn vague quality words into measurable targets.
  • You should understand why p95 and p99 latency matter.
  • You should know the difference between availability and durability.
  • You should understand that consistency depends on the product flow.
  • You should be ready to estimate traffic and storage in the next lesson.