Course contentsShow
← System Design
Lesson 23 of 1,9191. System Design Mindset and First PrinciplesFree lesson

QPS and Daily Active Users Estimation

Calculate queries per second from daily active users and average actions per user per day.

QPS and Daily Active Users Estimation

What you'll learn: How to convert daily active users into queries per second — a foundational skill for capacity planning.

Why This Matters

In system design, you often start with user-facing numbers like "10 million daily active users" but need to translate that into queries per second (QPS) to size your infrastructure. This conversion bridges business metrics and engineering requirements.

The Core Formula

Start with what you know:

  • Daily Active Users (DAU): How many unique users use your system per day
  • Average actions per user per day: What each user does (searches, posts, page loads, etc.)

Total daily queries = DAU × actions per user per day

Then divide by seconds in a day to get average QPS:

Average QPS = (DAU × actions per user) / 86,400 seconds

(There are 86,400 seconds in 24 hours)

Example Calculation

Suppose you're designing Twitter:

  • DAU: 200 million users
  • Average tweets read per user per day: 50

Total daily queries = 200M × 50 = 10 billion queries/day

Average QPS = 10,000,000,000 / 86,400 ≈ 115,740 QPS

Peak vs Average

Remember: traffic isn't uniform. Peak hours might see 2-3x average QPS. If average is 115K QPS, plan for 230K-345K QPS during busy times.

The Analogy

Think of a coffee shop: knowing "300 customers per day" doesn't tell you how many baristas you need. But knowing "300 customers, 2 drinks each = 600 drinks, concentrated in 8 hours" → roughly 1.25 drinks per minute average, maybe 3-4 during morning rush → now you can staff appropriately.

Key Takeaway: Converting DAU to QPS transforms abstract user counts into concrete server load, letting you estimate throughput requirements and infrastructure capacity.