From Active Users to Average and Peak QPS

Back of the Envelope Estimation · 35 min

System Design · Module 4 · Lesson 1 of 4 · 35 min

From Active Users to Average and Peak QPS

Convert user activity into separate read and write rates, model bursts, and explain which assumptions control the answer.

Calculate the database workload →
A user count becomes a request rate only after you specify active users, actions and a time interval.

01 The idea

The problem this lesson solves

100,000 daily users making 10 redirects each produce 1,000,000 redirects/day.

Prerequisite: earlier lessons introduce the vocabulary and shared examples used here. Follow the module order.

DAUDaily active users under the product’s chosen definition.
QPSRequests or queries per second for a named operation.
Peak factorAn explicit multiplier used to model a higher rate than the daily average.

02 Worked example

Follow one worked example

From Active Users to Average and Peak QPS worked diagram01100,000 DAU× 10 reads021,000,000/day÷ 86,4000311.57 avg QPS× 5 peak0457.87 peakBefore cachingKeep the units and assumptions visible at each step.From Active Users to Average and Peak QPS compact diagram01100,000 DAU× 10 reads021,000,000/day÷ 86,4000311.57 avg QPS× 5 peak0457.87 peakBefore caching
100,000 DAU: × 10 reads • 1,000,000/day: ÷ 86,400 • 11.57 avg QPS: × 5 peak • 57.87 peak: Before caching.

Trace the example in order. Follow the same identities, units and state transitions through the diagram and the events below.

1
Count requests100,000 daily users making 10 redirects each produce 1,000,000 redirects/day.
2
Convert and peak1,000,000 / 86,400 = 11.57 QPS average. Multiply by 5 to get 57.87 QPS peak.
3
Apply the cacheAt 90% hits, the miss fraction is 0.10. The database receives about 5.79 read QPS.
4
Plan for recoveryAt 0% hits it receives 57.87 read QPS. Provision and test recovery for this case instead of trusting only the warm-cache number.

A user count becomes a request rate only after you specify active users, actions and a time interval.

03 The method

Mechanisms decisions and a guided tutorial

Work through the explanation in order, then apply it in the tutorial. Each comparison names a cost as well as a benefit.

Choice or conceptPurposeBoundary or cost
Users × actionsDaily requestsRegistered users are not DAU
Daily requests / 86,400Average QPSAverage can hide events
Average × peak factorModeled peakThe factor needs evidence
Misses × read QPSDatabase read rateNot the same as external QPS

Start from daily actions

100,000 users × 10 redirects = 1,000,000 redirects per day. A day has 86,400 seconds, so average read traffic is 1,000,000 ÷ 86,400 ≈ 11.57 QPS. A 5× peak assumption gives 57.87 read QPS. The average write rate is 10,000 ÷ 86,400 ≈ 0.116 QPS; if writes share the same peak factor, peak writes are 0.579 QPS. Keep raw values until the end and round capacity upward, not every intermediate quantity.

Peak is a hypothesis to test

A daily average hides time zones, lunch peaks and launch events. A synchronized burst can overwhelm a service whose daily average looks tiny. Label the peak factor as an assumption and ask how it was measured. If one event produces 100,000 requests in ten seconds, that burst is 10,000 QPS regardless of the day's average. A queue can absorb some delayed work, but an interactive redirect has a different waiting budget from an asynchronous report.

Keep units in every line

Our workload has 100,000 daily active users and ten redirects per user per day. Multiplication gives one million redirects per day, not one million per second. Divide by 86,400 seconds per day to obtain approximately 11.57 redirects per second on average. A five-times peak assumption produces about 57.87 redirect QPS.

Write requests/day and seconds/day beside the numbers so the units visibly cancel. A number without a unit is easy to reuse incorrectly in a storage or bandwidth estimate. Keep unrounded intermediate values and round only the reported result or required capacity.

Reads and writes have different paths

Ten thousand new links per day average about 0.116 creation requests per second. At the same modeled peak multiplier that becomes about 0.579 write QPS. A cache can remove many mapping reads but does not make link creations disappear. Authentication and analytics may also add operations, so distinguish client requests from internal database queries.

One request can trigger several queries or no query on a cache hit. State which boundary the rate counts. The app, limiter, cache and database can all see different QPS even while serving the same external users.

A daily multiplier can miss a synchronized event

If 60,000 users open a link in five seconds, that event alone produces 12,000 QPS during those seconds. The daily average may still look modest. A queue can delay asynchronous work, but a redirect must fit an interactive waiting budget.

Use a traffic shape appropriate to the feature: sale starts, notification fan-out and classroom launches can synchronize users. Treat a five-times multiplier as an assumption to validate, not a property of all internet workloads. The console compares warm and cold cache demand after the same external peak; the next lessons develop the other capacity budgets.

Guided tutorial

1. Create a unit table

List daily users, reads/user/day, new links/day and assumed peak multiplier.

2. Calculate average reads

Multiply actions, then divide by 86,400.

3. Calculate writes separately

Apply the same steps to creations and label the different rate.

4. Challenge the peak

Add a synchronized launch event and compare its short-window rate with the multiplier model.

daily_reads = 100000 * 10
average_read_qps = daily_reads / 86400
peak_read_qps = average_read_qps * 5
average_write_qps = 10000 / 86400
peak_write_qps = average_write_qps * 5
# Console also shows database reads after cache hits.

05 Cheat sheet

Review the decisions

Use this table to explain the mechanism and its limit without memorizing a product name.

Choice or conceptRememberCheck
Users × actionsDaily requestsRegistered users are not DAU
Daily requests / 86,400Average QPSAverage can hide events
Average × peak factorModeled peakThe factor needs evidence
Misses × read QPSDatabase read rateNot the same as external QPS
DAUDaily active users under the product’s chosen definition.
QPSRequests or queries per second for a named operation.
Peak factorAn explicit multiplier used to model a higher rate than the daily average.

06 Where & why

Check the primary references

Use official references for protocol and implementation details. The questions here are teaching prompts.

Primary reference
Google SRE overload handling

Read Google SRE overload handling

Primary reference
Google SRE service-level objectives

Read Google SRE service-level objectives

State the implementation version and the workload assumptions when defending your own design.

07 Interview questions

Explain the reasoning out loud

Answer before opening the explanation. The questions progress from vocabulary to decisions and failure behavior.

What does DAU mean?
Daily active users under the product’s chosen definition.
What does QPS mean?
Requests or queries per second for a named operation.
What does Peak factor mean?
An explicit multiplier used to model a higher rate than the daily average.
Why ask whether users are daily or monthly active?
The interval determines how many actions occur in the time window. Registered population alone says little about current request demand.
Why keep reads and writes separate?
They have different paths and resource costs. Read caching may reduce database lookups while writes still require authoritative persistence.
Can one request mean several database queries?
Yes. QPS must name its measurement boundary. Count fan-out and auxiliary work when estimating each dependency.
Is the highest daily average a reliable launch peak?
No. Short synchronized bursts can greatly exceed a whole-day average. Model the event’s own time window.
Why avoid rounding every intermediate step?
Early rounding compounds error and can change a threshold decision. Keep raw values until reporting or rounding required capacity upward.

08 Practice problems

Practice a new case

Solve the new cases before revealing hints. Complete worked solutions follow the set.

Daily requests

Easy
Convert 8.64 million reads per day into average QPS.
Follow-up
Use a full 24-hour day.
Show the hint
There are 86,400 seconds per day.

Daily actions

Easy
Find daily reads from 30,000 active users making 12 reads each.
Follow-up
State the assumption or edge case that makes the answer correct.
Show the hint
Multiply actions before converting time.

Separate traffic

Medium
Convert 864,000 reads/day and 8,640 writes/day into average QPS.
Follow-up
State the assumption or edge case that makes the answer correct.
Show the hint
Use the same time unit for each.

Peak model

Medium
Apply a six-times peak factor to 4.32 million daily reads.
Follow-up
State the assumption or edge case that makes the answer correct.
Show the hint
First find the average.

Launch event

Medium
Estimate QPS when 24,000 users each make two requests within 8 seconds.
Follow-up
State the assumption or edge case that makes the answer correct.
Show the hint
Count the event’s actions and its own window.

Capacity memo

Hard
Size a service with 2 million daily users, 8 reads/user/day, 4× peaks and 90 percent hits; explain whether those numbers prove it needs shards.
Follow-up
Capacity estimates do not reveal all write or storage constraints.
Show the hint
Calculate reads first, then list missing information.

Worked solutions

1. Daily requests

8,640,000 / 86,400 = 100 read QPS.

2. Daily actions

30,000 × 12 = 360,000 reads/day.

3. Separate traffic

Reads average 10 QPS; writes average 0.1 QPS.

4. Peak model

4,320,000 / 86,400 = 50 QPS average; modeled peak is 300 QPS.

5. Launch event

48,000 requests / 8 seconds = 6,000 QPS during the event.

6. Capacity memo

16 million daily reads / 86,400 = about 185.19 average QPS, 740.74 peak QPS, and 74.07 database read QPS after caching. These do not prove sharding is necessary. Measure query cost, write load, storage size, hot keys and failure capacity before splitting data.