Estimating Traffic in System Design

When preparing for system design interviews or architecting real-world applications, one of the most fundamental skills is the ability to estimate traffic. Without knowing how many requests, queries, or writes your system will handle, you can’t reason about scalability, infrastructure, or cost.
That’s where RPS (Requests per Second), QPS (Queries per Second), and WPS (Writes per Second) come in. Let’s break them down and learn how to estimate them from your user base.
1. What Are RPS, QPS, and WPS?
- RPS (Requests per Second):
The number of incoming HTTP requests your system handles per second. This includes reads, writes, or any kind of API call.
Example: A Twitter-like system where users refresh their feed or post tweets. - QPS (Queries per Second):
The number of queries made to your database per second. Each incoming request may trigger one or multiple queries.
Example: Loading a news feed may involve queries for posts, users, and likes. - WPS (Writes per Second):
The number of write operations (insert, update, delete) your system processes per second.
Example: Posting a new comment, updating a like counter, or logging user activity.
Think of them like this:
RPS → API layer → QPS/WPS → Database layer
2. Daily Active Users (DAU) as the Starting Point
To estimate traffic, you first need a clear definition of Daily Active Users (DAU).
- Total Users = All registered users.
- DAU = The number of unique users who interact with your system on a given day.
Not all registered users are active every day. As a rule of thumb in consumer apps:
- DAU is often 10–30% of total users.
- For example, if you have 1 million registered users, you might expect ~200,000 DAU.
- DAU is the foundation for all traffic estimations.
3. How to Calculate RPS, QPS, and WPS
Once you know your DAU, you need to translate that into per-second load. Here’s a simple step-by-step approach:
Step 1: Estimate Requests per Day
Average number of requests a single active user makes in one day.
- Example: A messaging app user might send 40 requests/day (open app, fetch chats, send messages).
So:
Total Requests per Day = DAU × Avg Requests per User per Day
Step 2: Convert to RPS
There are 86,400 seconds in a day. Divide total requests by 86,400 to get RPS.
RPS = (DAU × Avg Requests per User per Day) / 86,400
Example:
DAU = 200,000
Requests per user/day = 40
→ Total requests = 8,000,000/day
→ RPS ≈ 92
This means your system needs to handle ~92 requests per second on average.
Peak RPS is usually 2–5× higher than average.
Step 3: Estimate QPS
Each API request might trigger multiple database queries. For example:
- Fetching a feed = 5 queries
- Posting a tweet = 2 queries
QPS = RPS × Avg Queries per Request
If each request triggers ~3 queries:
QPS = 92 × 3 = 276
Step 4: Estimate WPS
Not every request is a write. Often, 10–20% of requests are writes, and the rest are reads.
WPS = RPS × Write Percentage
Example:
RPS = 92
Writes = 15%
→ WPS = ~14
4. Why This Matters in System Design
Traffic estimation isn’t about exact numbers — it’s about order of magnitude thinking. In interviews or real-world planning, you should be able to say:
- “Our system has ~200k DAU, each doing ~40 actions/day.”
- “That translates to ~100 RPS, ~300 QPS, and ~15 WPS.”
- “So we’ll need caching, replication, and sharding strategies to handle it.”
This shows you understand capacity planning, which is the foundation of designing scalable systems.
5. Key Takeaways
- RPS, QPS, and WPS are critical metrics for system load.
- DAU is the starting point — derived from total users.
- Use formulas:
- RPS = (DAU × Requests per User per Day) / 86,400
- QPS = RPS × Queries per Request
- WPS = RPS × Write Percentage
- Always consider peak load (2–5× average).
- Estimating traffic is the foundation of system design — it drives your decisions on caching, load balancing, replication, and database scaling.
👉 Next time you’re asked to “design Twitter” or “design Instagram” in an interview, start with DAU → RPS/QPS/WPS. This one skill will instantly make your solution feel structured and realistic.
Originally published on Medium.