Lesson 5 · Scaling and Trade-offs
Design Requirements & Estimating Resource Needs
Turning vague product goals into concrete, quantifiable engineering constraints.
System design begins with translating vague product goals into numerical boundaries. You cannot design for "high scale" or "low latency" until those terms are defined as concrete targets — a specific RPS figure, a specific latency percentile, a specific number of nines.
This lesson covers two things: how to split requirements into functional and non-functional buckets, and how to turn a handful of business projections into Back-of-the-Envelope (BOTE) numbers for throughput, storage, and bandwidth — the numbers that tell you whether your architecture is even feasible.
Defining Requirements
Functional vs. Non-Functional
Every requirement you gather falls into one of two buckets. Confusing the two is a common source of designs that satisfy the product spec but fail under real load.
Three Levers
NFRsWhat to Interrogate First
Is the load read-heavy, like a news feed serving far more views than posts, or write-heavy, like a logging or telemetry pipeline? This determines whether you optimize for caching and read replicas or for write throughput and ingestion buffering.
How much data must be stored, and for how long? A chat app retaining messages forever has fundamentally different storage economics than one that purges after 30 days.
What is the maximum acceptable downtime? A target of 99.9% versus 99.99% changes your redundancy strategy, deployment process, and infrastructure cost by orders of magnitude.
Back-of-the-Envelope
The Rule of 86,400
There are 86,400 seconds in a day. Divide total daily requests by that constant and you get average requests per second — the starting point for every capacity estimate.
100M DAU × 10 requests/day
Back-of-the-Envelope
Storage Capacity Projection
Storage calculations rely on the size of a single record multiplied by the frequency of creation. If a user creates one 50KB post daily, the numbers compound fast.
100M users × 50KB post/day
Trade-offs
Raw Size Is Never Final Size
When estimating, you must account for overhead. Indexing, replication, and metadata add 20% to 50% on top of raw data size. A 1.8PB/year projection can realistically land closer to 2.2-2.7PB/year once these are factored in — and that gap is exactly the kind of number that changes a budget conversation.
Putting It Together
From Product Goal to Architecture Decision
Back-of-the-Envelope
Bandwidth: The Hidden Bottleneck
Beyond raw CPU and storage, bandwidth is often overlooked. Response payloads must physically move across the network, and that cost scales linearly with both request rate and payload size.
Summary
Numbers Define the Boundaries
Quiz Review
Check your understanding
Question 1 of 8
What is the difference between functional and non-functional requirements?
- ✓Functional requirements define what the system does (e.g., "users can upload photos"). Non-functional requirements (NFRs) define how the system performs — latency, throughput, availability.