Most system design interviews do not need a long capacity-estimation exercise. Calculate only what can change your design.
Across common system design questions, the recurring calculations are:
- Traffic: average and peak requests per second.
- Storage: data created per day and retained over time.
- Throughput: bytes or operations processed per second.
- Capacity: workers or servers needed to meet that load.
Do these first. Calculate cache size, concurrency, queue growth, or ID space only when the problem specifically depends on them.
The easiest method: keep everything in powers of 10
Do not count zeros. Convert every number into this form:
coefficient × 10^exponent
Round the coefficient to an easy number such as 1, 2, 2.5, 5, or 10.
When multiplying, add the exponents. When dividing, subtract the exponents.
240 M = 2.4 × 10^8
50 K = 5 × 10^4
500 bytes = 5 × 10^2 bytes
250 ms = 2.5 × 10^-1 seconds
1 day = 86,400 seconds ≈ 10^5 seconds
Common powers of 10
For counts such as users, requests, or records:
| Short form | Name | Power of 10 | Example |
|---|---|---|---|
| K | Thousand | 10^3 | 1 K = 1,000 |
| M | Million | 10^6 | 1 M = 1,000,000 |
| B | Billion | 10^9 | 1 B = 1,000 M |
| T | Trillion | 10^12 | 1 T = 1,000 B |
| Qa | Quadrillion | 10^15 | 1 Qa = 1,000 T |
For data sizes:
| Unit | Name | Bytes |
|---|---|---|
| kB | Kilobyte | 10^3 bytes |
| MB | Megabyte | 10^6 bytes |
| GB | Gigabyte | 10^9 bytes |
| TB | Terabyte | 10^12 bytes |
| PB | Petabyte | 10^15 bytes |
Use B for billion only when discussing a count, such as 2 B records. In GB, the B means bytes.
Multiplication example: storage
50 M records × 200 bytes
= (5 × 10^7) × (2 × 10^2)
= 10 × 10^9 bytes
= 1 × 10^10 bytes
= 10 GB
Division example: requests per second
240 M requests/day ÷ 10^5 seconds/day
= (2.4 × 10^8) ÷ 10^5
= 2.4 × 10^3
= 2.4 K RPS
The exact result is 2.78 K RPS. The rounded answer is enough to establish the scale.
Mixed-units example: concurrency
Convert milliseconds to seconds before multiplying:
8 K RPS × 250 ms
= (8 × 10^3) × (2.5 × 10^-1 seconds)
= 20 × 10^2
= 2 × 10^3
= 2 K requests in flight
Keep units beside every value. The powers handle the zeros; the units confirm that the calculation means what you think it means.
The four calculations to know
1. Traffic
First estimate how many requests the system receives in one day. Then divide by the number of seconds in a day to get the average requests per second (RPS). For quick math, round 86,400 seconds to 10^5.
Requests/day = daily active users × requests/user/day
Average RPS = requests/day ÷ 10^5
Peak RPS = average RPS × peak factor
Example:
100 M requests/day = 10^8 ÷ 10^5 = 10^3 = 1 K RPS
Peak traffic at 5× = 1 K × 5 = 5 K RPS
The average shows the normal load. The peak estimate shows the load the system should be ready to handle. Use a peak factor supplied by the interviewer or traffic data; otherwise, state it as an assumption.
Dividing by 10^5 is a scale estimate, not capacity headroom. Add peak and safety margins separately.
2. Storage
Storage depends on three values: how many records are created, the size of each record, and how long the records are kept.
Storage = records/day × bytes/record × retention days
Convert each value to a power of 10 and then multiply:
1 M records × 1 kB
= 10^6 × 10^3 bytes
= 10^9 bytes
= 1 GB
Example:
10 M events/day × 500 bytes × 30 days
= (10^7) × (5 × 10^2) × (3 × 10^1)
= 15 × 10^10 bytes
= 1.5 × 10^11 bytes
= 150 GB
This is the logical storage required for the records themselves.
3. Throughput and bandwidth
Throughput tells you how much data moves through the system every second.
Bandwidth = requests/second × bytes/request
1 K RPS × 1 kB
= 10^3 × 10^3 bytes/s
= 10^6 bytes/s
= 1 MB/s
Example:
20 K responses/s × 5 kB
= (2 × 10^4) × (5 × 10^3)
= 10^8 bytes/s
= 100 MB/s
= 800 Mbps
The final conversion uses 1 byte = 8 bits.
The same method works for systems that continuously receive events, such as logs, analytics, monitoring metrics, or messages:
5 M metrics/s × 200 bytes
= (5 × 10^6) × (2 × 10^2)
= 10^9 bytes/s
= 1 GB/s
This result tells us that the ingestion pipeline, message queue, and storage layer must collectively accept about 1 GB every second. It helps determine whether the workload needs batching, partitioning, or multiple consumers.
4. Capacity
Required instances = ceil(peak load ÷ tested usable capacity per instance)
ceil means round up to the next whole server. A partial server cannot handle the remaining load.
Example:
50 K peak RPS ÷ 5 K RPS/server
= (5 × 10^4) ÷ (5 × 10^3)
= 10^1
= 10 servers
Add failure headroom after calculating the basic server count.
Use measured or interviewer-provided capacity when possible. There is no universal “RPS per server.”
For batch systems, the requirement is often a deadline instead of an RPS target. Examples include crawling websites, processing uploaded videos, generating reports, or migrating data. First calculate how much work all workers complete per second. Then divide the total work by that combined rate:
Completion time = total work ÷ aggregate processing rate
Suppose one crawler processes about 3,750 pages each second and we run eight crawlers:
8 crawlers × 3,750 pages/s ≈ 3 × 10^4 pages/s
Together, they process about 30 K pages per second. Now divide the 10 B pages by that combined rate:
10 B pages ÷ 30 K pages/s
= 10^10 ÷ (3 × 10^4)
≈ 3.3 × 10^5 seconds
≈ 4 days
This tells us whether eight crawlers can meet the deadline. If the requirement is two days, we need roughly twice the processing capacity; if the requirement is five days, eight crawlers are sufficient for this estimate.
Calculate these only when the design needs them
Cache load and memory
A cache reduces database reads by serving frequently requested data from memory. Two separate calculations matter:
- Miss traffic: how many requests still reach the database.
- Cache memory: how much memory is needed to hold the cached entries.
Database reads/s = read RPS × cache miss rate
Cache memory = resident entries × complete entry size
A 95% hit rate means the cache serves 95 out of every 100 reads. The remaining 5% are misses that go to the database:
20 K reads/s × 5%
= (2 × 10^4) × (5 × 10^-2)
= 10^3
= 1 K database reads/s
Now estimate the memory required. If the cache holds 10 M entries and each complete entry uses 500 bytes:
10 M entries × 500 bytes
= (10^7) × (5 × 10^2)
= 5 × 10^9 bytes
= 5 GB
A complete entry should include the cache key, value, and metadata. Counting only the value can underestimate the required memory.
The percentage of records stored and the hit rate are not the same. A cache might store only 10% of all records but still achieve a 95% hit rate if users repeatedly request that popular 10%.
Concurrency
Concurrency is the number of requests the system is handling at the same time. A request remains “in flight” from the moment it arrives until the system finishes processing it.
Average concurrency = arrival rate × average time in system
Suppose 10 K requests arrive every second and each request takes 100 ms, or 10^-1 seconds, to finish:
10 K RPS × 100 ms
= (10^4) × (10^-1 seconds)
= 10^3
= 1 K requests in flight
The result means that, on average, about 1,000 requests are being processed simultaneously. Even though 10,000 requests arrive each second, each one remains in the system for only one-tenth of a second.
This estimate helps size resources that are held while a request is active, such as open connections, memory, workers, and database connections. It is especially important for streaming or other long-running requests because a longer duration creates higher concurrency even when the arrival rate stays the same.
Use average latency with average RPS when estimating average concurrency. A p99 latency describes the slowest 1% of requests, so multiplying it by average RPS does not represent the normal number of requests in flight.
Queue growth
A queue grows when jobs arrive faster than workers can process them. Estimate how much work accumulates during the overload and how long workers need to clear it afterward.
Backlog added = (arrival rate − processing rate) × duration
Drain time = backlog ÷ (processing rate − ongoing arrival rate)
If the overload lasts five minutes, or 3 × 10^2 seconds:
Backlog = (10 K − 8 K) × 5 minutes
= (2 × 10^3 jobs/s) × (3 × 10^2 seconds)
= 6 × 10^5 jobs
= 600 K jobs
If arrivals later fall to 5 K jobs/s:
Net drain rate = 8 K − 5 K = 3 × 10^3 jobs/s
Drain time = (6 × 10^5) ÷ (3 × 10^3)
= 2 × 10^2 seconds
= 200 seconds
The backlog can drain only when the processing rate is greater than the ongoing arrival rate.
Identifier space
Possible IDs = alphabet size ^ code length
For Base62:
| Length | Possible codes |
|---|---|
| 6 | 56.8 B |
| 7 | 3.52 T |
For a six-character code, round 62 to 6 × 10^1:
62^6 ≈ (6 × 10^1)^6
= 6^6 × 10^6
≈ 4.7 × 10^10
The exact value is about 5.68 × 10^10, or 56.8 B codes.
Use this for URL shorteners or invitation codes. If codes are random, still enforce uniqueness and retry collisions.
The quick reference sheet
| Quantity | Formula or shortcut |
|---|---|
| Seconds/day | 86,400 ≈ 100 K |
| Average RPS | Requests/day ÷ 10^5 |
| Peak RPS | Average RPS × stated peak factor |
| Storage | Records × bytes/record |
| Retained storage | Records/day × size × days |
| Bandwidth | RPS × bytes/request |
| Byte-to-bit rate | 1 MB/s = 8 Mbps |
| Cache misses | Read RPS × miss rate |
| Average concurrency | RPS × average latency in seconds |
| Server count | Peak load ÷ usable capacity/server |
Join the discussion
Spot a mistake or have another perspective? Share your feedback, insights, or suggestions.