Requirements and Constraints
Lesson 2Beginner1h 6mAssessment-backed

Requirements and Constraints

Learn how to turn a vague product idea into clear functional requirements, non-functional requirements, assumptions, and engineering constraints.

What you will be able to do

Separate functional requirements from non-functional requirements.
Identify constraints that change architecture decisions.
Ask clarifying questions before drawing a system.
Convert a real product scenario into a design-ready requirement brief.
Explain why AWS, GCP, and Azure choices must follow requirements, not replace them.

Most weak system designs fail before the first box is drawn. The engineer starts solving a problem they have not clearly defined. This lesson teaches you how to define the problem first.

Why Requirements Come First

A requirement says what the product or system must do. A constraint limits how the system can do it. If you skip this step, every architecture choice becomes a guess: database, queue, cache, cloud service, deployment model, and even team ownership.

Requirement funnel from vague product idea to design-ready brief
Good system design narrows a vague product request into users, flows, data, scale, reliability, and constraints.
InputBad interpretationBetter requirement
Build notificationsSend some messagesUsers can receive email, push, and in-app notifications based on preferences.
Make it fastUse cache everywhereThe API should acknowledge notification creation within 200 ms at p95.
Make it reliableUse multiple servicesAccepted notifications should not be lost if a provider is temporarily down.
Support scaleUse KubernetesHandle 2,000 writes/sec during campaigns and 10x read traffic after launch.

Functional vs Non-Functional Requirements

Functional requirements describe user-visible behavior. Non-functional requirements describe system qualities: latency, throughput, availability, durability, security, compliance, cost, maintainability, and observability.

Requirement typeQuestionNotification example
FunctionalWhat should the system do?Create, schedule, send, retry, cancel, and show delivery status.
LatencyHow fast should it feel?Creating a notification should return quickly; delivery can happen in the background.
ThroughputHow many operations?Normal traffic is 100 notifications/sec; campaign traffic peaks at 2,000/sec.
DurabilityWhat cannot be lost?Accepted notification jobs and user preference changes must survive crashes.
SecurityWho can do what?Only authorized services can send notifications for a tenant.
CostWhat budget pressure exists?Do not use always-on high-cost streaming if batch workers satisfy the need.

Design principle

A feature is not a requirement until it has a user, a behavior, a boundary, and at least one measurable expectation.

Scenario: Food Delivery Order Status

Imagine a food delivery app wants real-time order status: order accepted, restaurant preparing, rider assigned, picked up, nearby, delivered. This sounds simple, but the design changes once requirements are clarified.

Constraint board for food delivery order status system
The same feature becomes a different system depending on freshness, fanout, accuracy, and failure expectations.
Clarifying questionPossible answerDesign impact
Who watches status?Customer, restaurant, rider, support teamMultiple clients and permission rules.
How fresh must location be?Customer map updates every 3-5 secondsPush, polling, or streaming decision.
What can be delayed?Support analytics can lag by minutesCan use async events and batch processing.
What must be correct?Final delivered status and payment stateNeeds durable writes and careful state transitions.
What happens during outage?Show last known status and retry updatesRequires cached state, idempotent events, and observability.

Constraints That Shape Architecture

Constraints are not annoyances. They are the reason one design is better than another. A small internal tool, a global chat app, and a banking ledger should not have the same architecture.

ConstraintWhat it meansArchitecture pressure
ScaleUsers, requests/sec, data size, peak trafficLoad balancers, partitioning, queues, caching.
LatencyHow quickly users need a responseSync path must stay small; slow work moves async.
ConsistencyHow correct data must be across replicasTransactions, locking, conflict handling, or eventual consistency.
AvailabilityHow often the system must workRedundancy, failover, degradation, operational maturity.
DurabilityWhat data cannot be lostReliable storage, backups, replication, replayable logs.
ComplianceLegal, privacy, audit, region, retention rulesAccess control, encryption, audit trails, data residency.
Team constraintTeam size, skills, support capacityManaged services and simpler designs may beat custom complexity.

Requirement Brief Template

Before designing, write a compact brief. This prevents vague architecture and gives reviewers a concrete basis for trade-offs.

SectionWhat to writeExample
UsersWho interacts with the systemCustomers, restaurants, riders, support agents.
Core flowsThe main actionsUpdate order status, view order status, notify customer.
DataImportant entities and stateOrder, status history, rider location, notification record.
ScaleReads, writes, storage, peak behavior20k active orders, 5 location updates/order/minute.
LatencyExpected response timeStatus page should show fresh updates within 5 seconds.
ReliabilityWhat happens during failureDo not lose final status updates; show last known state if live updates fail.
Out of scopeWhat you will not design yetRestaurant inventory, payments, pricing, fraud detection.

Cloud Services Follow the Brief

Cloud platforms matter in real work, but they should appear after the design need is clear. If the requirement says low-latency API plus durable background delivery, then you can map the pieces to managed compute, queues, databases, caches, and observability services.

Architecture needAWSGCPAzure
HTTP APIAPI Gateway + ECS/EKS/LambdaCloud Load Balancing + Cloud Run/GKE/FunctionsAPI Management + Container Apps/AKS/Functions
Durable queueSQSPub/Sub or Cloud TasksService Bus queues
State storageRDS/DynamoDBCloud SQL/Firestore/SpannerAzure SQL/Cosmos DB
Fast shared stateElastiCacheMemorystoreAzure Cache for Redis
Metrics and tracesCloudWatch/X-RayCloud Monitoring/Cloud TraceAzure Monitor/Application Insights

How to Answer a Vague Request

When someone says, design a notification system or design live order tracking, do not begin with a diagram. First state the questions you need answered, then make reasonable assumptions if the interviewer or product owner does not provide them.

StepWhat to sayWhy it matters
1Let me clarify the users and core flow first.Prevents designing the wrong product.
2I will separate must-have behavior from quality targets.Keeps functional and non-functional requirements visible.
3I will make explicit scale assumptions.Architecture depends on traffic and data growth.
4I will name out-of-scope areas.Controls complexity and keeps the design focused.
5I will revisit assumptions when choosing storage, cache, queue, and cloud services.Shows trade-off discipline.

Beginner Mistakes

  • Treating requirements as a formality instead of the foundation.
  • Writing words like fast, scalable, and reliable without numbers or user impact.
  • Mixing must-have product behavior with optional future features.
  • Trying to solve every possible failure in the first design.
  • Choosing AWS, GCP, Azure, Kafka, or Kubernetes before knowing the real constraint.

Guided Practice

Practice task

Take a notes app. Write three functional requirements, three non-functional requirements, two constraints, and two things you would explicitly keep out of scope for version one.

Sample Answer

CategoryExample answer
Functional requirementsCreate note, edit note, list notes by updated time.
Non-functional requirementsSave should complete within 300 ms p95; notes should not be lost; users should access only their own notes.
ConstraintsSmall team; launch in one region first; mobile clients may be offline.
Out of scopeReal-time collaboration and full-text search ranking.

Before You Continue

  • You should be able to define functional requirements.
  • You should be able to define non-functional requirements.
  • You should understand that constraints shape architecture choices.
  • You should be able to write a short design brief before drawing a system.
  • You should be ready to quantify non-functional requirements in the next lesson.