Understanding load
Overview
“It needs to scale” means nothing until you say how much load. Is it 10 requests a second or 100,000? Mostly reads or mostly writes? Small JSON or 4K video? This lesson gives you the measures that describe load, so the rest of your design has a target.
The core numbers
Users
- DAU (daily active users) and MAU (monthly active users) describe the size of the audience.
- Concurrent users matter for systems with persistent connections, such as chat or games.
User counts are a starting point, not the answer. A user of a banking app might make 5 requests a day; a user of a social feed might make 200.
Requests per second
Convert users into QPS (queries per second) or RPS (requests per second):
requests per day = DAU × requests per user per day
average QPS = requests per day ÷ 86,400A day has 86,400 seconds; rounding to 100,000 (10⁵) is fine for estimates. So 1 million requests per day is about 12 per second, and 1 billion per day is about 12,000 per second. Memorise those two.
Peak vs average
Traffic is never flat. People use apps in the evening, shops get hammered on sale days, and sports sites spike during matches. A common assumption is peak = 2–3× average for everyday traffic, but special events can reach 10× or more.
Design for the peak plus some headroom. A system that copes with the average falls over at exactly the moment the most users are watching.
Read/write ratio
Split traffic into reads (fetching data) and writes (creating or changing data):
- Read-heavy systems (social feeds, news, product catalogues) often see 10:1 to 1,000:1. They benefit most from caches, CDNs and read replicas.
- Write-heavy systems (logging, metrics, IoT sensors, chat) need fast write paths: append-only storage, queues, batching and sharding.
The ratio is one of the most useful numbers in an interview because it points directly at the right tools.
Size of data
Count bytes as well as requests:
- Request and response size: a 1 KB JSON response at 10,000 QPS is 10 MB/s; a 2 MB image at the same rate is 20 GB/s and changes the design completely.
- Data growth: new data per day, and how long you keep it.
- Working set: the part of the data that’s accessed often; if it fits in memory, life is much easier.
The shape of traffic
Beyond averages and peaks, ask how traffic behaves:
- Daily and weekly cycles: predictable, so autoscaling can follow them.
- Spikes: a flash sale, a viral post or a push notification sent to millions at once. These arrive in seconds, faster than new servers can start, so you need headroom, queues or rate limits.
- Hot keys: a celebrity’s profile or a trending product gets a huge share of reads. Load is uneven even when the total is fine.
- Geography: global users bring traffic around the clock and make distance a factor.
Which kind of load is it?
Different workloads stress different resources:
| Workload | Example | Usually limited by |
|---|---|---|
| Many small reads | Product pages | Database reads, cache hit rate |
| Many small writes | Likes, metrics | Write throughput, contention on hot rows |
| Large transfers | Video, backups | Bandwidth, storage |
| Heavy computation | Search ranking, encoding | CPU |
| Long-lived connections | Chat, live updates | Memory and connections per server |
Load in an interview
Spend a minute pinning load down during requirements:
- “How many daily active users, and how many actions does each do per day?”
- “Is it read-heavy? Roughly what ratio?”
- “Are there predictable peaks or big events?”
- “How big are the objects: text, images, video?”
If the interviewer says “you decide”, pick round, reasonable numbers, write them on the board and move on. Then use them: “with 35,000 reads per second at peak, a single database won’t keep up, so I’ll put a cache in front of it”.
Recap
Load is described by users, requests per second (average and peak), the read/write ratio and the size of data. One million requests a day is about 12 per second; design for the peak, not the average. The ratio and the data size tell you which tools you’ll need, and the shape of the traffic tells you how much headroom to keep.
Describe the load
A food-delivery app has 8 million daily active users. On average each user opens the app 3 times a day and each session makes 15 API reads (menus, restaurant lists, order status). About 10% of users place an order each day, and an order involves 5 writes. Most traffic happens at lunch and dinner. Estimate (a) reads per day and average read QPS, (b) writes per day and average write QPS, (c) the read/write ratio, (d) a sensible peak QPS to design for, and say what the ratio suggests about the design.
(a) Reads:
(b) Writes:
(c) Ratio:
(d) Peak:
What it suggests:(a) Reads: 8M x 3 x 15 = 360 million/day. 360M / 86,400 = about 4,200 reads/s on average.
(b) Writes: 8M x 10% = 800k orders x 5 writes = 4 million/day.
4M / 86,400 = about 46 writes/s on average.
(c) Ratio: 360M : 4M = 90:1, strongly read-heavy.
(d) Peak: traffic is concentrated at meal times, so assume 4-5x the average:
~20,000 reads/s and ~200-250 writes/s at peak.
What it suggests:
- Cache menus and restaurant lists aggressively (they change rarely) and use a CDN for images.
- Add read replicas for the database; one primary easily handles a few hundred writes/s.
- Order status is read often but changes; cache it briefly or push updates to the app.Summary
- Load is described with numbers: daily active users, requests per second (average and peak), read/write ratio and data size.
- Average QPS = requests per day ÷ 86,400; a day has about 10⁵ seconds.
- Design for the peak, which is often 2–5× the average and much higher during events.
- The read/write ratio decides the toolkit: caches and replicas for reads, queues and sharding for writes.
- Also capture request and response sizes, data growth and how spiky the traffic is.