Skip to content
We areTOP 1%

How do you estimate bandwidth, cache size and the number of servers?

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

Answer

Derive each from the QPS and data-size estimates: bandwidth is QPS multiplied by response size, cache size follows from the hot fraction of daily data, and server count is peak QPS divided by per-server capacity.

  • Bandwidth: 12,000 read QPS at 100 KB per response is about 1.2 GB/s of egress, a strong signal for a CDN.
  • Cache: using the 80/20 rule, caching the hottest 20% of 10^9 daily reads of 1 KB objects needs about 200 GB of memory, which fits on a few cache nodes.
  • Servers: if one server handles about 1,000 requests per second, a 30,000 QPS peak needs around 30 servers, plus headroom for failures and deployments.
  • Present results as round numbers and state what each implies for the design.

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