Skip to content
We areTOP 1%

How do you estimate the queries per second (QPS) a system must handle?

MediumConceptBack-of-the-Envelope Estimation
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Start from daily active users, multiply by actions per user per day, and divide by the number of seconds in a day (about 10^5). Then apply a peak factor and split reads from writes.

  • Example: 100 million DAU each making 10 requests a day gives 10^9 requests per day, or about 12,000 QPS on average.
  • Peak: traffic is uneven, so assume 2 to 3 times the average, giving roughly 25,000 to 35,000 QPS.
  • Read/write split: with a 10:1 read-to-write ratio, writes are about 1,100 QPS on average, which tells you whether a single primary database can cope.
  • State every assumption, round freely, and sanity-check the result against what one server can handle.

More in Back-of-the-Envelope Estimation

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account