A product manager walks up to your desk: “Build us a notification system. It needs to be fast and reliable.”
You could start coding right now. But what does fast mean? One second? One minute? And reliable? Is it fine to send a notification twice? Is it fine to lose one? How many per day: a thousand, or ten million?
Every one of those answers leads to a different design. Until you have them, you are designing in the dark.
This is what requirements are for. Not paperwork, but the numbers that decide your architecture. In this guide you’ll learn the two kinds of requirements, how to turn vague words into measurable targets, how constraints shape the design, and what SLIs, SLOs and SLAs really mean.
Why requirements matter
Requirements turn a vague idea into a concrete target. Without them, you will:
- build for a million users when you have a hundred,
- over-engineer the parts where simple would do,
- under-engineer the one part that must never fail,
- and argue about solutions forever, because nobody agreed on the goal.
Good requirements also answer a question every engineer struggles with: when is it good enough? If the target is “95% of searches in under 300 ms” and you’re at 250 ms, you’re done. Stop optimising and ship.
Here is the notification system again, before and after:
Vague: "Build a fast, reliable notification system."
Clear:
- Volume: 1M notifications/day now, 10M/day in a year
- Speed: delivered within 5 seconds, 99% of the time
- Delivery: never lose one; a rare duplicate is OK
- Availability: 99.9% uptime
- Outages: notifications may be delayed, then catch up
- Budget: $500/month for infrastructure
Now you can design. “Never lose one, duplicates OK” already tells you to use a queue with retries. “Delayed, then catch up” tells you the system can buffer during an outage instead of failing.
Functional vs non-functional requirements
Requirements come in two kinds:
- Functional requirements describe what the system does: the features.
- Non-functional requirements describe how well it does them: speed, scale, reliability, security, cost.
Here is the important part: functional requirements decide your features, but non-functional requirements decide your architecture. “Users can upload files” is the same feature whether files are 10 MB or 5 GB. But 5 GB files need chunked, resumable uploads, progress tracking and background processing. Same feature, completely different system.
The most common non-functional requirements to ask about:
| Requirement | The question it answers | Example target |
|---|---|---|
| Latency | How fast does one request respond? | 95% of requests under 200 ms |
| Throughput | How much work per second? | 10,000 searches per second at peak |
| Availability | How often is it up? | 99.9% uptime |
| Durability | Can we ever lose data? | Orders survive a server failure |
| Consistency | Must everyone see the latest data right away? | Balances: yes. Like counts: no |
| Scale | How big will it get? | 1M users now, 10M in a year |
Turn vague words into numbers
Words like fast, reliable and scalable feel clear, but you can’t design for them, and you can’t test them. Your job is to turn each one into a number:
A note on “95% of requests under 200 ms.” We don’t use the average, because averages hide pain. If most requests take 50 ms but one in twenty takes 3 seconds, the average still looks fine while thousands of users wait. So we talk in percentiles: p95 under 200 ms means 95 out of 100 requests finish within 200 ms. Big systems also watch p99, the slowest 1%.
From requirement to design decision
Once requirements are numbers, design decisions almost make themselves. Look at two very different systems.
An online shop’s product search, with 1 million products, 10,000 searches a second on Black Friday, and two backend developers:
| Requirement | Design decision |
|---|---|
| Results in under 300 ms for 95% of searches | Use a search engine like Elasticsearch, not slow LIKE queries in the database |
| 10,000 searches a second at peak | Cache popular searches |
| New products searchable within 5 minutes | Update the search index in the background from a queue |
| 99.95% uptime | Run more than one copy of the search cluster |
A payment system, where money can never be lost or charged twice:
| Requirement | Design decision |
|---|---|
| Strong consistency | A transactional database (like PostgreSQL), not a fast cache |
| Durable: survive a crash mid-payment | Save the payment as PENDING before calling the card provider |
| Finish in under 3 seconds | Time out the provider call after 2 seconds |
| Never lose money | On timeout, mark for retry, never silently drop it |
// Java · PaymentService.java
@Transactional
public PaymentResult pay(PaymentRequest req) {
// Durability: save it first, so a crash can't lose it
Payment p = repository.save(Payment.pending(req));
try {
// Latency: never wait more than 2 seconds
var res = gateway.charge(req, Duration.ofSeconds(2));
p.complete(res.id());
} catch (TimeoutException e) {
// Never lose money: retry later, never drop it
p.markForRetry();
retryQueue.add(p);
}
return PaymentResult.from(repository.save(p));
}
Notice that the search system happily accepts slightly stale data to be fast, while the payment system gives up speed to be correct. Same skills, opposite choices, because the requirements are opposite. For money, it is better to fail a payment than to charge someone twice.
Constraints: the limits you design inside
Requirements say what the system must do. Constraints say what you have to do it with. They come in two kinds:
- Business constraints: budget, deadline, team size, laws and regulations, existing contracts.
- Technical constraints: your current tech stack, data volume, traffic patterns, old systems you must connect to.
They flow into each other like this:
Business constraints often shape the design more than any technical one:
- “We must launch in 6 weeks” → no custom-built infrastructure; use managed services.
- “The budget is $200 a month” → one region, a managed database, little redundancy.
- “The team only knows Java” → stay in the Spring Boot ecosystem rather than learn a new language mid-project.
- “We handle health data” → encryption everywhere, audit logs, and careful checks on third-party services.
A perfect architecture that breaks the budget or misses the deadline isn’t perfect. It’s useless.
Trade-offs: you can’t max out everything
Requirements fight each other. The classic picture is a triangle:
Every strong requirement has a price:
- Low latency costs money: more servers, caches, a CDN.
- High availability costs complexity: copies of data, automatic failover, maybe several regions.
- Strong consistency can cost availability: when parts of the network can’t talk, the system may have to refuse requests rather than return wrong data.
- High throughput often means accepting eventual consistency: data that catches up a moment later, like a social feed.
- A strict SLA costs people: monitoring, alerts and someone on call at 3 a.m.
“Perfect is impossible. Your job is to make people choose.”
SLI vs SLO vs SLA
These three terms confuse many engineers, but they are simple once you see them together. They are how you make non-functional requirements measurable:
- SLI (Service Level Indicator): what you measure. For example, the percentage of requests that succeed.
- SLO (Service Level Objective): the target you aim for. For example, 99.95% success over 30 days.
- SLA (Service Level Agreement): the promise to customers, with a consequence. For example, if success drops below 99.9% in a month, customers get a 25% refund credit.
Notice that the SLO (99.95%) is stricter than the SLA (99.9%). That gap is your safety margin: your alerts fire when you miss the SLO, long before you break the promise and owe customers money.
And look at what each extra “9” really means. 99.9% uptime still allows almost 9 hours of downtime a year. 99.99% allows under an hour. Getting there usually means multiple regions, automatic failover and a much bigger bill, so make sure the business truly needs it before you promise it.
What breaks when requirements are missing
Here is the failure-first view: the real-world disasters that come from skipping this step.
- Assumed scale. A team hears “chat app”, thinks “like WhatsApp”, and builds Kafka and microservices. The real app has 500 users, 50 of them active each day. The result: a slow, expensive system that’s hard to change. Always ask “how many?” before choosing technology.
- Ignored consistency. Someone stores account balances in a fast cache “for speed”. Two payments land at the same moment, and the balance comes out wrong. For money and other critical data, correctness beats speed.
- No SLO. The requirement was “be reliable”. There’s no target, no monitoring, no one on call. Then a 2-hour outage happens, and nobody can even say whether that was acceptable. Vague requirements lead to vague systems.
Puzzle: the impossible wish list
What’s wrong: the four goals fight each other. Strong consistency means servers have to agree before answering, which is hard to do in 10 ms. Strong consistency plus 99.99% availability is very hard when parts of the network fail. And all of it on $1,000 a month is not realistic.
What to do: don’t quietly pick one. Make the trade-off visible:
- Explain the costs in plain words: “Under 10 ms means we may show slightly old prices. Four nines means several regions, at roughly $5,000 a month.”
- Ask for priorities. For trading, being correct comes first, then being available, then speed.
- Offer real options, for example: strongly consistent, 99.9% available, under 100 ms, $3,000 a month, or eventually consistent, 99.99% available, under 10 ms, $1,500 a month.
Then let the business choose. That conversation is a big part of an architect’s job.
Use it at work: a one-page requirements note
You don’t need a big document. Before your next feature, write a short note like this one, for a profile picture upload:
Ten minutes of writing, and code reviews become easy: “What happens with a 6 MB file? What if S3 is down? How do we know we’re at 99.9%?”
In the interview
Interviewers use requirements to test your judgement. When they say “Design Instagram”, a weak answer starts naming tools. A strong answer starts with questions:
- How many daily users? How many posts are read for every post written?
- Must a new post appear instantly everywhere, or is a few seconds fine?
- What matters more: fast uploads, or a fast-loading feed?
- What’s the budget, and what’s the goal for launch versus one year out?
And when they ask “How would you handle 100 times the traffic?”, ask back: 100 times the users, or the requests? A one-day spike or steady growth? Reads or writes? Each answer leads to a different fix.
Key takeaways
- Requirements are decision tools. They stop you from over- and under-engineering.
- Functional = what. Non-functional = how well. The second kind shapes your architecture.
- Turn vague words into numbers. “Fast” → “p95 under 200 ms”. “Reliable” → “99.9% uptime”.
- Requirements conflict. Make the trade-offs visible, and make people prioritise.
- SLI, SLO, SLA: measure it, aim for it, promise it, with a safety gap between the last two.
- Business constraints are real constraints. Budget, deadline and team size often decide more than technology.
Next: turning these requirements into hard numbers with back-of-the-envelope estimation, so you know how many servers, how much storage and how much bandwidth you really need.
Comments