QPS Estimation
QPS (queries per second) estimation converts daily active users and behavior into the request rate the system must handle: DAU × actions/user/day ÷ 86400 = average QPS. The same formula split by operation type gives read QPS vs write QPS, the most important architecture-driving ratio. Peak QPS is 3-5x average for normal workloads and 10-100x for event-driven spikes. QPS estimation is the first and most central of the four capacity-estimation skills.
Foundational.
How it works
QPS estimation computes the request rate a system must handle, derived from user counts and behavior. The base formula:
QPS = (DAU × actions_per_user_per_day) / 86400where 86,400 is the number of seconds in a day. The result is the average QPS — what the system handles in steady state.
Example: 200M DAU, 50 reads/user/day.
- Reads/day = 200M × 50 = 10B reads/day.
- Average QPS = 10B / 86400 ≈ 115,000 QPS (115k QPS).
This is the starting point. Two refinements make it useful:
-
Peak QPS. Real traffic is never uniform; it has peaks. Peak is typically 3-5x average for normal workloads, 10-100x for event-driven spikes (Super Bowl, breaking news). Design for peak, not average. So 115k average QPS → design for 500k peak QPS.
-
Read QPS vs write QPS. Most systems have very different read and write rates — typically 10:1 to 100:1. The read:write ratio drives the entire caching strategy: read-heavy systems are cache-friendly; write-heavy systems need different patterns. Split QPS into reads and writes before making any architecture decision.
The read:write ratio drives architecture.
Splitting QPS into read and write is the most important refinement. The read:write ratio determines which caching strategy, which database, and which scaling pattern fits the system:
-
100:1 or higher (read-heavy): Cache-aside or write-through is ideal. The cache hit rate will be high (because reads dominate and re-reads are common), and the cost of cache invalidation on writes is amortized across many reads. Most web apps (Twitter, Facebook, Instagram, news sites) are 100:1 or higher.
-
10:1 (moderate read): Cache-aside still works, but the cache hit rate is lower. Consider write-through to keep the cache fresher without doubling write load.
-
1:1 (balanced): Caching is less effective because writes evict/invalidate frequently. Consider write-behind (for coalescing) or skip the cache entirely. Analytics pipelines, message queues.
-
1:10 (write-heavy): Caching is rarely useful. The bottleneck is write throughput. Consider: write-behind for coalescing, LSM-tree databases (Cassandra) for write-optimized storage, partitioning by time/key, and eventual consistency. IoT telemetry, event logging, clickstream.
The deeper insight: read-heavy workloads are cache-friendly; write-heavy workloads are not. Many engineers apply cache-aside reflexively to every system, but for write-heavy workloads the cache hurts more than it helps (invalidation cost dominates). Knowing the read:write ratio before designing is essential.
In interviews, always split read and write QPS before discussing architecture. The interviewer is testing whether you recognize that the caching strategy depends on the ratio.
Average QPS tells you the steady-state load; peak QPS is what the system must handle without degrading. Peak factors vary by workload: 2-3x for steady internal tools, 3-5x for normal consumer apps, 5-10x for media/entertainment, 10-100x for event-driven spikes (Super Bowl, Black Friday, breaking news). The system designed for 115k average QPS but only 200k peak will collapse at peak. The standard rule: estimate average, multiply by 3-5x for normal peak, design for 2x peak headroom. So 115k average → design for ~1M peak QPS. This is why "what if a tweet goes viral" is a great interview question — it tests peak thinking.
Estimating actions-per-user-per-day.
The hardest input to estimate is actions-per-user-per-day, because it varies enormously by system. Some reference points from real systems:
- Twitter: ~5 tweets/user/day for active posters; ~50 timeline reads/user/day for active readers.
- WhatsApp: ~50 messages/user/day; ~150 reads/user/day (each conversation generates many reads).
- Google Search: ~10-20 searches/user/day for heavy users.
- Netflix: ~1-2 hours of streaming/user/day = continuous low-QPS streaming.
- Instagram: ~50 feed reads/user/day, ~10 stories viewed, ~1-2 posts.
- YouTube: ~10 video plays/user/day.
For interview estimates, state your assumption explicitly and let the interviewer correct it. Wrong assumptions are fine; silent assumptions are not. The structure is: "I assume a typical user performs N actions per day — does that sound reasonable?"
A useful sanity check: if your estimated QPS implies more requests than there are internet users, you are wrong. The global internet has ~5B users; if your "search engine" QPS implies 100B searches/day, that is 20 searches per user per day on Earth — possible but high. Sanity-check your numbers against global scale.
The other sanity check: a single beefy server handles ~5-10k QPS for typical web workloads. If your estimate is 10 QPS, a single server is fine; if it is 1M QPS, you need 100-200 servers. The translation from QPS to instance count is the architecture decision the estimation is supposed to drive.
The QPS estimation interview step-by-step.
- State DAU. "Assume 200M DAU for Twitter."
- State actions/user/day, split by read and write. "Assume 5 tweets/user/day (writes) and 50 timeline reads/user/day (reads)."
- Compute daily totals. Writes/day = 200M × 5 = 1B. Reads/day = 200M × 50 = 10B.
- Convert to QPS. Write QPS = 1B / 86400 ≈ 11.5k. Read QPS = 10B / 86400 ≈ 115k.
- Compute peak. Peak = avg × 3-5x. Write peak ≈ 60k. Read peak ≈ 575k.
- Compute read:write ratio. 100:1 → cache-friendly.
- Translate to architecture. "At 575k peak read QPS, we need a load balancer + ~100 app servers (assuming 5k QPS each) + Redis cluster (cache absorbs 90% of reads) + read replicas on the DB. Write QPS of 60k is high for a single DB; consider sharding or write-behind for counters."
The whole exercise takes 1-2 minutes if you have the conversions memorized. The conversions that matter: 1 day = 86400 sec (round to 100k for estimation); 1B/day ≈ 11.6k QPS; 1M/day ≈ 11.6 QPS.
The numbers do not need to be exact. They need to be reasonable and to drive a coherent architecture. An interviewer who hears "500k peak QPS → load balancer + 100 app servers + Redis cluster + read replicas" knows the candidate can connect numbers to design.
WhatsApp has ~1B DAU and ~50 messages/user/day. What is the average write QPS?
Pick one answer.
You estimate a system at 10k average read QPS and 1k average write QPS (10:1 read:write ratio). The interviewer asks whether to use cache-aside or write-behind. What is the right answer?
Pick one answer.
Your estimate gives 50k average read QPS. You size the system for 50k. At 9am Monday, traffic spikes to 200k QPS and the system crashes. What went wrong?
Pick one answer.
Engineering mental model
Mental model. Think of QPS Estimation as a deliberate boundary in a system. The boundary exists because something becomes harder to manage when everything is done in one place: latency, scale, failure isolation, consistency, cost, or team ownership. The useful question is not “what does QPS Estimation mean?” but “what pressure makes this boundary worth introducing, and what new failure mode does it create?”
Before choosing QPS Estimation, name the workload, the critical user path, the dominant bottleneck, the failure you are trying to absorb, and the trade-off you are willing to accept. If you cannot name those five things, the design is probably premature.
// Pseudocode
request = receive()
result = qps_estimation(request)
return result
// Production questions:
// 1. What happens on timeout?
// 2. Can this operation be retried safely?
// 3. What is the bottleneck?Back-of-the-envelope reasoning
Example: 10M requests/day ÷ 86,400 ≈ 116 requests/s average. Design for peak rather than average; a 10× peak is ≈ 1,160 requests/s.
Interactive thought experiment: QPS Estimation
Change the variables below and predict what breaks first in QPS Estimation. The production lab can later reuse these same inputs.
Change one variable at a time. Predict the failure mode first, then move the slider and see whether your mental model matches the simplified system response.
If you are stuck on QPS Estimation, start by drawing the request path and marking every network hop, stateful component, queue, cache and failure boundary. Then estimate where the system will saturate.
You increase traffic by 10× in a system using QPS Estimation. What should you inspect first?
Pick one answer.
Which statement is the safest engineering habit when using QPS Estimation?
Pick one answer.
You have dashboards for traffic, latency, errors and saturation. You can change the architecture, but every change has operational cost.
Production scenario: your system uses QPS Estimation, traffic suddenly spikes, and p99 latency doubles. What is your first move?
Interview drill
Answer this without notes: When would you choose QPS Estimation, and when would you intentionally avoid it? Mention at least one bottleneck it addresses, one failure mode it introduces, and one alternative. Then quantify the workload you are designing for.
A useful engineering lens for QPS Estimation: define the problem it solves, the simpler design that fails first, the constraint that forces you to introduce this concept, and the new failure modes the concept creates.
Numerical sanity check
Back-of-the-envelope reasoning beats fake precision. State your traffic, payload, concurrency and growth assumptions explicitly, then calculate enough to know whether the current architecture is orders of magnitude away from the target.
Do not optimize for a memorized definition. Reason from the workload and failure mode.
Imagine the simplest version of a system using QPS Estimation. What breaks first as traffic grows by 10×, and what would you change before reaching 100×?
Pick one answer.
What you gain, what you pay
- +Single number (QPS) drives almost every architecture decision.
- +Read:write split reveals the caching strategy and DB scaling pattern.
- +Peak factor forces realistic design for non-uniform traffic.
- +Fast to compute (1-2 minutes in an interview).
- +Sanity-checkable against global scale (does this imply more QPS than the internet has users?).
- −Captures steady-state, not failure cascades.
- −Actions-per-user assumptions vary wildly by system — easy to be off by 10x.
- −Does not capture per-request latency (QPS without latency is half the picture).
- −Peak factors are workload-dependent — using a fixed 5x may over- or under-provision.
- −Ignores long-tail latency (p99 vs p50 matters for user experience).
How this breaks in production
- Sizing for average instead of peak — system collapses at peak.
- Treating read and write QPS as interchangeable — they drive different architecture.
- Wrong actions-per-user assumption (off by 10x) — silently wrong, never corrected.
- Forgetting to divide by 86400 (86400x error) — "1B reads/day" treated as "1B QPS".
- Not sanity-checking against global scale — implies more QPS than the internet supports.
- Treating the estimate as exact — building for exactly 575k QPS rather than a range.
Don't fall into these traps
- •Not splitting read and write QPS — interviewer cannot see if you recognize the read:write ratio matters.
- •Using 1M seconds/day (instead of 86,400) — small error but compounds.
- •Sizing for average, not peak.
- •Not translating QPS into instance counts ("100k QPS means ~20 app servers at 5k QPS each").
- •Assuming uniform traffic — real systems have peaks, surges, and quiet hours.
- •Treating QPS as the only number — bandwidth and storage matter too, and may dominate.
Real systems using this
How real systems implement this
- WhatsApp at 1B users — WhatsApp handled ~50B messages/day = ~580k average write QPS, with ~50 engineers on Erlang. Their architecture was QPS-driven: vertical scaling of Erlang nodes, with horizontal scaling across regions. One of the highest QPS-per-engineer ratios in industry.
- Twitter / X at peak — Twitter's peak QPS during major events (World Cup, elections) reaches 100k+ tweets/sec and millions of timeline reads/sec — designed with horizontal scaling, fanout-on-write timelines in Redis, and aggressive caching.
- Netflix streaming — Netflix's QPS for video plays is modest (~10k/sec globally), but bandwidth per request is enormous (Mbps per stream). QPS underestimates their load — bandwidth is the dominant constraint. This illustrates why QPS alone is not enough.
- Cloudflare / AWS rate limits — Rate limits are QPS-based: Cloudflare's free plan limits 1000 req/day per IP; AWS API Gateway quotas are typically 10 RPS default, 5000 RPS on request. These limits are direct applications of QPS estimation to capacity planning.
Practice saying it out loud
- Q1Estimate the read and write QPS for Twitter with 200M DAU.
- Q2WhatsApp has 1B users sending 50 messages/day. What is the write QPS? What does this imply for the architecture?
- Q3Your system has 100k average read QPS. How do you size the app tier, the cache, and the DB?
- Q4Why is the read:write ratio more important than the absolute QPS for choosing a caching strategy?
- Q5Your estimated QPS implies more requests than the global internet supports. What does that tell you?
Further reading & references
Core explanations are original NO CAP material. External references are provided for deeper study and standards.
What next?
Mark as understood once the mental model clicks.
Next recommended
Storage Estimation