Requirements & Constraints¶
A retailer asks your team to replace its order platform before the next seasonal sale. The initial brief sounds straightforward: customers should place orders, pay, and track delivery. The platform must be fast, highly available, and ready for growth.
That brief could justify several very different architectures. Should checkout wait for payment authorization? Can the platform accept an order when inventory is unreachable? Does “highly available” include a regional outage? Must the new system continue using the existing warehouse integration?
Each answer changes the design. Before drawing services and databases, the architect's job is to turn these expectations into observable behavior, measurable targets, and explicit limits.
Separate behavior, quality, and limits¶
Requirements describe what the system must achieve. Constraints restrict the solutions available to achieve it. Assumptions fill gaps temporarily and need validation.
| Category | Order-platform example | Architectural consequence |
|---|---|---|
| Functional requirement | Customers can submit an order and retrieve its status. | Requires an order lifecycle, persistent state, and interfaces for submission and retrieval. |
| Business rule or invariant | A confirmed order must have a valid inventory reservation and successful payment authorization. | Defines when confirmation is allowed and how partial failures must be handled. |
| Quality requirement, often called a non-functional requirement | Checkout must meet a stated latency target during peak traffic. | Influences dependency calls, capacity, queueing, and timeout budgets. |
| Constraint | The existing warehouse system cannot be replaced in this release. | Requires compatibility with its interfaces and operational limits. |
| Assumption | Peak checkout traffic will be ten times the daily average. | Provides a provisional capacity estimate until traffic evidence validates it. |
The distinction helps prevent a common mistake: accepting an implementation preference as a requirement. “Use microservices” may be an organizational constraint, an existing decision, or simply a suggestion. Ask what outcome it is intended to achieve. Independent deployments might justify service boundaries; a small team and a short deadline might favor a modular monolith.
Functional requirements can also drive major architectural decisions. A requirement to reverse a payment, preserve an audit history, or prevent overselling may affect the design more than a general request for scalability.
Follow one critical journey before listing components¶
For the retailer, start with checkout. Walk through what the customer does, what the platform promises, and what can interrupt that promise.
A customer submits a cart. The platform checks prices, reserves inventory, authorizes payment, and returns an order status. Later, fulfillment processes the order and the customer receives updates.
The important questions sit between these steps. If payment succeeds but the response is lost, what should a repeated submission do? If inventory reservation succeeds and payment fails, when is the reservation released? If the warehouse is offline, can checkout continue while fulfillment waits?
These questions expose the business contract. Suppose stakeholders agree that the platform may return pending while payment is unresolved, but must never return confirmed before inventory and payment conditions are met. That agreement permits asynchronous completion without weakening the confirmation rule.
Also establish scope. Product recommendations may improve conversion, but they need not be on the checkout path. Keeping recommendations outside the critical journey allows them to fail without preventing a purchase.
Replace adjectives with testable scenarios¶
“Fast” and “resilient” do not tell an engineer what to build or an operator when the system is failing. A useful quality scenario states the triggering event, operating conditions, expected response, and how that response will be evaluated. The Software Engineering Institute's quality-attribute scenario approach provides a structured way to make these expectations concrete.[^quality-scenarios]
For example:
During a sale, when customers submit up to 500 checkout requests per second for 30 minutes, at least 95% of valid submissions must receive a confirmed, pending, or explicit business-rejection response within two seconds, measured at the public API boundary. Technical failures must remain below 0.1% of valid submissions.
These figures are illustrative targets, not benchmark results. They must be negotiated against business needs, dependency behavior, and cost.
Notice that a pending response satisfies this response-time target without proving that payment or fulfillment finished. If pending is allowed, define a separate completion target and a policy for unresolved orders. Otherwise, the service could appear healthy while its backlog grows indefinitely.
Use the same precision for failure and security requirements:
| Concern | Example requirement to agree | What must be clarified |
|---|---|---|
| Availability | 99.95% of valid checkout submissions receive an allowed response over a calendar month. | Define eligible requests, allowed outcomes, measurement boundary, and exclusions. Track technical failures separately from business rejections. |
| Duplicate submission | Repeating the same logical checkout within a 24-hour retry window creates at most one order and does not cause a second payment authorization. | Define request identity, changed payload handling, payment-provider support, and behavior after the window expires. |
| Dependency failure | A payment timeout leaves the order pending; the customer can retrieve its status without resubmitting payment. | Specify deadlines, reconciliation, and how long pending orders may remain unresolved. |
| Access control | A customer can retrieve only orders they are authorized to access. | Define ownership, delegated access, support permissions, and checks at each access path. |
| Recovery | Following regional failure, restore checkout within 30 minutes. No confirmed order may be lost. | Define the failure scope, recovery starting point, durable acknowledgement boundary, and evidence required to prove recovery. |
“No confirmed order may be lost” is stronger than a general recovery point objective of five minutes. If both appear in the brief, resolve the contradiction or give them separate scopes. Perhaps confirmed orders require no data loss while analytics can tolerate five minutes. A single recovery target rarely describes every data class adequately.
Let requirements narrow the architecture¶
Requirements become useful when they change a design choice. Keep a visible connection between the promise, the mechanism, and the evidence that the mechanism works.
Each row shows a candidate response to a requirement. These are design relationships, not request flows or a complete system architecture.
Consider three choices for the retailer:
Complete checkout synchronously. The customer receives an immediate outcome, and the workflow is relatively easy to follow. However, checkout inherits the latency and availability of the dependencies it waits for. A timeout still creates uncertainty if a dependency completed work before the connection failed.
Accept checkout for asynchronous processing. This can absorb bursts and let the API respond before slow downstream work finishes. It introduces pending states, backlog management, duplicate handling, and recovery logic. Acceptance must follow durable recording of the request; acknowledging work that exists only in memory breaks the promise during a crash. Choose this option only if the business accepts delayed confirmation.
Deploy across multiple regions. This can address regional failure and geographic latency requirements, but adds replication, routing, failover, and possibly write-conflict complexity. It does not resolve an unavailable shared payment provider. If the agreed requirement covers only instance or availability-zone failures, a regional design may satisfy it with less operational burden.
The requirement narrows the alternatives; it rarely selects a technology by itself. Returning pending orders, for example, does not automatically require an event broker or a fleet of microservices.
Make constraints and uncertainty visible¶
The warehouse system may process only 100 fulfillment requests per second while checkout accepts 500. A queue can absorb a temporary difference, but sustained arrivals above processing capacity produce an increasing backlog. The design needs a tolerable fulfillment delay, burst duration, backlog limit, and action when the limit is reached.
A delivery deadline and team capabilities matter too. A design that meets its targets only with operational expertise the team does not have is unlikely to meet them in production. Compare the cost of managed capabilities, simpler deployment models, and reduced initial scope alongside infrastructure capacity.
For each consequential assumption, record an owner and a validation action. Validate traffic estimates against sale history; measure payment latency in a representative environment; confirm warehouse throughput with its owner. Identify which design choices would change if the assumption proves wrong.
Prioritize requirements using business impact and architectural risk. Preventing duplicate charges is a mandatory correctness condition. A recommendation widget's response time may be negotiable. An unverified recovery requirement deserves early investigation because it could change persistence and deployment choices late in delivery.
Keep the promises connected to production¶
Give important requirements stable identifiers and retain their links to architecture decisions and validation evidence. A short requirements register is usually enough; it should make disagreements and open questions visible, not become a document nobody maintains.
For example, a checkout latency requirement should connect to a latency budget, a load-test scenario, and a production metric at the agreed boundary. A duplicate-submission requirement should connect to idempotency behavior and tests that interrupt the workflow after payment authorization but before the client receives a response. A recovery requirement needs a recovery exercise that checks data integrity as well as service restoration.
Observe both the customer-facing response and the downstream outcome. Fast API responses cannot demonstrate timely order completion. Record pending-order age, reconciliation failures, and fulfillment backlog alongside response latency and technical errors. Avoid placing sensitive customer or payment data in diagnostic logs.
Revisit the requirements when the business contract changes. Adding international customers, a new payment provider, or a promise of immediate confirmation can invalidate earlier decisions even if traffic remains unchanged.
For this order platform, a useful starting agreement is concrete: what makes an order confirmed, whether pending is acceptable, what duplicate submissions mean, which failures must be tolerated, and what the existing warehouse can sustain. Once those points are explicit, components can be selected against a shared contract—and competing designs can be evaluated on evidence.
Related concepts¶
- Scalability, Latency & Throughput: translate workload expectations into capacity and bottleneck analysis.
- Availability & Reliability: refine service guarantees and recovery requirements.
- Consistency Models: choose visibility and coordination guarantees for business operations.
Reference¶
[^quality-scenarios]: Carnegie Mellon Software Engineering Institute, Quality Attribute Workshops (QAWs), Third Edition. Its scenario-refinement approach includes the source, stimulus, environment, affected artifact, response, and response measure.