Back-of-the-envelope capacity estimation: DAU to average and peak requests per second, storage per year, bandwidth and cache size, with useful rounding numbers and how the result drives design choices.
A capacity estimate turns user numbers into load. Start with daily active users ร actions per user to get requests per day, divide by ~86,400 s (round to 10^5) for average requests/s, then multiply by a peak factor (2โ10ร, often 3ร). For storage, multiply writes per day by record size and 365, then add indexes and replicas. For bandwidth, multiply requests/s by payload size.
Example: 10M DAU ร 20 reads = 200M reads/day โ 2,300/s average, ~7,000/s peak.
The point is not precision โ it's deciding whether one database and a cache are enough or you need partitioning. The trade-off is speed versus accuracy: round hard, but state every assumption.
"I keep estimates to about three minutes and a few lines on the board. I start from daily active users and what each user does per day, separately for reads and writes because they hit different parts of the system. Requests per day divided by 86,400 gives the average rate โ I round 86,400 to 100,000 to keep the maths mental, which slightly under-counts, and that's fine. Then I apply a peak factor: consumer apps are spiky in the evening, business apps cluster in working hours, so I usually use three times average and say so.
Say we're designing a photo-sharing feed with 10 million daily actives. Each user views 50 posts and uploads 0.2 photos a day. That's 500 million reads a day, around 5,000 a second average and 15,000 at peak; and 2 million uploads a day, about 20 a second, 60 at peak. If metadata is 1 KB and a photo averages 2 MB, metadata grows 2 GB a day โ under a terabyte a year โ while photos grow 4 TB a day, about 1.5 PB a year. That immediately tells me metadata fits in a relational database, photos go to Blob Storage behind a CDN, and the read path needs caching because 15,000 reads a second against one database is uncomfortable.
The mistake I see is people doing careful arithmetic and then never using it. Every number should change a decision: whether you need a cache, a queue, read replicas, partitioning, or a CDN. If it doesn't, you didn't need to calculate it."
| Quantity | Value |
|---|---|
| Seconds per day | 86,400 โ 10^5 |
| Seconds per month | ~2.6 million |
| 1 million requests/day | ~12/s average |
| 1 billion requests/day | ~12,000/s average |
| 1 KB ร 1 billion | 1 TB |
| Item | Arithmetic | Result |
|---|---|---|
| Reads/day | 10M ร 50 | 500M |
| Read rps (avg) | 500M รท 10^5 | ~5,000/s |
| Read rps (peak, 3ร) | 5,000 ร 3 | ~15,000/s |
| Uploads/day | 10M ร 0.2 | 2M |
| Upload rps (peak) | 2M รท 10^5 ร 3 | ~60/s |
| Metadata/year | 2M ร 1 KB ร 365 | ~730 GB |
| Photos/year | 2M ร 2 MB ร 365 | ~1.5 PB |
| Read egress (peak) | 15,000 ร 200 KB thumbnail | ~3 GB/s โ CDN |
| Finding | Design consequence |
|---|---|
| Reads โซ writes (250:1) | Cache-aside with Redis; read replicas |
| 1.5 PB/year of binaries | Blob Storage with lifecycle tiers, not the database |
| 3 GB/s egress | Azure Front Door / CDN in front of Blob Storage |
| < 1 TB/year metadata | One Azure SQL database is fine for years |
| 60 writes/s | No need for a write queue for throughput |
Client -> Front Door (CDN) -> Blob Storage (photos)
|
+--> API (App Service / Container Apps, ASP.NET Core)
|-> Redis (hot feed items)
|-> Azure SQL (metadata, primary + readable secondary)
On an internal reporting service, an estimate of 300 report generations a day โ under one request a minute โ showed the team's planned Kubernetes cluster and Kafka were unnecessary. A single Container App with a Service Bus queue for the 2-minute report jobs ran at about A$150 a month instead of the A$3,000 estimate for the cluster.
Checks whether the candidate can turn scale assumptions into numbers quickly and use them to drive concrete design decisions.
Green flags
Red flags
Capacity estimates only need to be right within an order of magnitude. The decision boundaries in design are coarse: a single SQL database handles thousands of simple queries per second; a single Redis node tens of thousands or more; one App Service instance hundreds to low thousands of requests per second depending on the work. If your estimate is 200/s or 400/s, the design is the same. If it's 200/s or 200,000/s, it is not.
DAU
x actions/user/day (reads and writes separately)
= requests/day
/ 86,400 (~10^5)
= average rps
x peak factor (2-10x)
= peak rps --> compute and DB sizing
writes/day
x record size
x 365
x (1 + index overhead) x replicas
= storage/year --> data store choice, partitioning
peak rps x payload
= bandwidth --> CDN, egress cost
Traffic is never flat. Business apps peak in working hours (roughly 8 busy hours, so peak โ 3ร the 24-hour average). Consumer apps have evening peaks. Event-driven systems (ticket sales, end-of-month payroll) can hit 10โ100ร for minutes. Ask about events: a ticketing system's design is driven entirely by the on-sale spike.
Raw record size understates storage. Add indexes (often 30โ100% extra in SQL Server), replicas (Azure SQL Business Critical keeps several replicas; Blob Storage ZRS keeps three copies), backups and retention. For logs and audit data, retention policy matters more than daily volume.
If 20% of items get 80% of reads, cache the hot 20%. With 10 million posts at 1 KB, the hot set is 2 GB โ one small Redis instance. Estimate hit ratio and the database load that remains: at 95% hits, 15,000 reads/s becomes 750/s on the database.
Once you have storage and egress, you can rough out monthly cost. Egress and premium storage often dominate; compute is frequently the smallest line.
A tiny estimator keeps the arithmetic honest and makes assumptions explicit โ handy for a design doc.
namespace Design.Capacity;
public sealed record Workload(
long DailyActiveUsers,
double ReadsPerUser,
double WritesPerUser,
int RecordBytes,
int ResponseBytes,
double PeakFactor = 3.0,
double IndexOverhead = 0.5);
public sealed record Estimate(
double AvgReadRps, double PeakReadRps,
double AvgWriteRps, double PeakWriteRps,
double StorageGbPerYear, double PeakEgressMbps);
public static class CapacityEstimator
{
private const double SecondsPerDay = 86_400;
public static Estimate Calculate(Workload w)
{
var readsPerDay = w.DailyActiveUsers * w.ReadsPerUser;
var writesPerDay = w.DailyActiveUsers * w.WritesPerUser;
var avgRead = readsPerDay / SecondsPerDay;
var avgWrite = writesPerDay / SecondsPerDay;
// Storage grows with writes; indexes add a percentage on top.
var storageGb = writesPerDay * w.RecordBytes * 365 * (1 + w.IndexOverhead) / 1e9;
// Egress in megabits per second at peak.
var egressMbps = avgRead * w.PeakFactor * w.ResponseBytes * 8 / 1e6;
return new(avgRead, avgRead * w.PeakFactor, avgWrite, avgWrite * w.PeakFactor, storageGb, egressMbps);
}
}
// var e = CapacityEstimator.Calculate(new Workload(10_000_000, 50, 0.2, 1_024, 2_048));
// e.PeakReadRps โ 17,361; e.StorageGbPerYear โ 1,121
Seniors use estimates to rule things out as much as in. "60 writes per second โ we don't need sharding, and a queue would only add failure modes" is as valuable as proving you need a CDN. They also validate the estimate against reality as soon as possible: a load test on one instance replaces an assumed per-instance capacity with a measured one.
The second senior habit is turning capacity into cost. Egress, premium storage and log ingestion are often the expensive lines, and an estimate exposes them before they appear on the invoice.
| Finding | Typical response | Cost | When not to |
|---|---|---|---|
| Read rps in the thousands, 100:1 ratio | Cache-aside, replicas | Staleness, cache invalidation | Data must be read-your-writes everywhere |
| Storage growing past a few TB/year | Archive tiers, partitioning | Query complexity | Data is small and short-lived |
| Write rps in the thousands | Partitioned store or queue-based levelling | Ordering and consistency complexity | Writes are a few per second |
| Egress in GB/s | CDN | CDN cost, cache invalidation | Personalised, uncacheable responses |
For most APIs, latency ร number of round trips dominates, not bandwidth. A request that makes 50 sequential database calls at 2 ms RTT spends 100 ms on the network; move the database to another region at 30 ms RTT and it spends 1.5 s. Fix it by reducing round trips (batching, joins, fewer chatty calls), moving compute near data, caching, and parallelising independent calls.
With 20 instances, a local cache is fastest but each instance holds its own version, while a distributed cache (Redis) gives one shared version at the cost of a network hop. I usually combine them: a short-lived L1 in each instance in front of a shared L2, which is exactly what HybridCache provides.
To keep L1 copies in line, I publish invalidation messages (Redis pub/sub or an Azure Service Bus topic) that every instance uses to evict keys. Messages can be missed, so the L1 lifetime is the real staleness bound.
I choose per data class: data that must agree everywhere skips L1, tolerant data gets longer L1. The trade-off is latency and Redis load versus how long instances may disagree.
I start with numbers: data size and growth, hot versus cold data, read/write ratio and tenant distribution. Then:
SWITCH makes archiving and purging metadata-only and enables partition-level index rebuilds. It is not an automatic speed-up and needs queries that allow partition elimination.Shard only when scale-up, read scale-out and archiving are exhausted: it moves complexity into the application.
How to tell it (STAR)
**S:** At [company], a new [document processing] service was planned on AKS with Kafka, costing about [A$ amount] a month before any code existed. **T:** I was asked to review the design before we committed. **A:** I did a quick estimate from the real user numbers — about [n] requests per second at peak — then load-tested a prototype on a single Container App instance, which handled [m] times that. I proposed Container Apps, a Service Bus queue and one Azure SQL database, and wrote an ADR listing the load at which we'd revisit. **R:** We launched [weeks] earlier, and the monthly cost was about [A$ amount], roughly [percentage]% lower than planned, with p95 latency of [x] ms.
Last updated 23 Nov 2026.