Quick maths for requests per second, storage and bandwidth, before you design anything.
Back-of-the-envelope estimation is quick, rough maths you do before designing, to learn how big the system must be.
The name comes from doing sums on the back of an envelope. In system design it means turning a vague sentence, such as "50 million people use our app every day", into numbers you can design with.
You always follow the same chain: users → requests per day → requests per second → peak load → storage → bandwidth → number of servers.
| Rule | Why it helps |
|---|---|
| 1 day ≈ 100,000 seconds (really 86,400) | Divide daily requests by 100,000 for a quick per-second number |
| 1 million per day ≈ 12 per second | A fast way to size any daily number |
| 1 KB = 1,000 bytes, 1 MB = 1,000 KB, 1 GB = 1,000 MB | Easy powers of ten; the small error does not matter |
| Peak ≈ 2 to 3 × average | Traffic is not even. Design for the busy hour, not the average |
| 1 year ≈ 365 days ≈ 30 million seconds | Handy for yearly storage and cost |
| 8 bits = 1 byte | Network speed is in bits, file sizes are in bytes |
A chat app has 50 million daily users who each send 40 messages a day. Each message is about 1 KB.
| Estimate | How | What it tells you |
|---|---|---|
| Traffic (QPS) | Daily requests ÷ 100,000, then × 2 to 3 for peak | How many app servers, and whether you need a cache |
| Storage | New records per day × size × days kept × copies | How big the database is, and if you need sharding |
| Bandwidth | Peak requests per second × size of each response | Network cost and whether a CDN is needed |
| Memory (for a cache) | Hot data share × total data size (often the top 20%) | How big the cache must be |
Most systems read far more than they write. A 100:1 read-to-write ratio is common for social feeds. Write the ratio down, because it decides whether to optimise for reads (cache, replicas) or writes (queues, sharding).
Rough teaching maths, not a forecast. Units are the easy 1,000-based ones (1 KB = 1,000 bytes). The server speed is a made-up starting point: real servers depend on the work done per request, so measure yours. Real systems also add overhead, indexes and growth.
| Term | Meaning in easy words |
|---|---|
| Estimation | A quick, rough calculation to find the size of a problem |
| DAU | Daily active users: people who use the product on a given day |
| QPS / RPS | Queries or requests per second |
| Peak load | The highest traffic in a period, often 2 to 3 times the average |
| Read:write ratio | How many reads happen for each write |
| Storage | The space needed for data, including copies and indexes |
| Replication factor | How many copies of each item are kept (often 3) |
| Bandwidth | Data moved per second over a network link |
| Orders of magnitude | Differences of 10 times, 100 times, 1,000 times: the scale we care about |
| Headroom | Spare capacity above the peak, for spikes and failures |
| Hot data | The small share of data that gets most of the traffic |
| Choice | We gain | We lose |
|---|---|---|
| Round hard | Speed and clarity | Some accuracy (usually fine) |
| Plan for a high peak | Safety in spikes | Higher cost when traffic is average |
| Plan for the average | Lower cost | Failures during the busy hour |
| Add many copies | Durability and read speed | More storage and write cost |
| Estimate far ahead (5 years) | Fewer redesigns | More chance that the guesses are off |
| Detailed model | More realistic numbers | More time, and often false precision |