Video in progress
Estimate roughly how many requests per second this requirement produces.
App: food delivery
Daily active users (DAU): 1,000,000
Each user sends an average of 10 API requests a day
Most orders fall at lunch and dinner time
10 million requests a day is about 115 RPS on average. At peak that is usually 2–5 times higher, so you should design the system for 300–600 RPS.
📖 Answer
The main trick: a day has roughly 100,000 seconds (exactly 86,400). That makes the rounding easy.
1,000,000 × 10 = 10,000,000 requests / day
10,000,000 / 100,000 ≈ 100 RPS (more precisely ~115)
But requests don't arrive evenly throughout the day. In food delivery, traffic jumps at lunch and dinner. The peak factor is usually taken as 2–3, and in a business like this it can even be 5:
115 × 5 ≈ 600 RPS at peak
What does this mean? 600 RPS is not heavy for a single well-tuned Spring Boot service. So at this stage you don't need a complicated architecture: 2–3 instances (for reliability) and one database with a replica are enough.
In an interview the order of magnitude matters, not the exact number: is it 100 RPS, 10,000, or 1 million? The design will be completely different depending on that.
Sign up to mark studied questions and save your progress.