Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Foundations of Scale
Lesson 2 of 16

Back-of-the-envelope estimation

Turn a product description into requests per second, storage and bandwidth before you draw a single box.

15 min read

Why estimate first

A design for 50 requests per second and one for 50 000 look very different. The first fits on a single server with a single database; the second needs load balancing, caching and probably several data stores. Estimation tells you which world you are in. You do not need precision: being within a factor of two or three is enough to choose the right building blocks. Round aggressively, write your assumptions down, and keep the numbers next to your design so you can check them later against the Feedback panel.

From daily users to requests per second

Start with daily active users and actions per user, then convert to per-second rates. A day has 86 400 seconds, which you can round to 100 000 for quick maths. Traffic is not flat, so multiply the average by a peak factor, typically 2 to 5, or more for launches and live events.

  • 10 million users x 20 reads a day = 200 million reads a day
  • 200 million / 100 000 seconds = about 2 000 reads per second on average
  • Peak factor 3 = about 6 000 reads per second to design for
  • 1 million requests a day is roughly 12 per second on average

Reads versus writes

Estimate reads and writes separately, because they scale differently. Most consumer systems are read-heavy: a post is written once and read hundreds of times, a product page is edited weekly and viewed thousands of times a day. A read-to-write ratio of 100:1 tells you that caches, CDNs and read replicas will carry most of the load, and that the write path can stay simple. A ratio near 1:1, as in chat or metrics collection, tells you the opposite: writes are the bottleneck, and you will need to think about write throughput, batching and eventually partitioning.

Storage and bandwidth

Storage is items per day times item size times retention, times the number of copies you keep. Bandwidth is requests per second times response size. Both reveal which component needs attention: a few gigabytes fit on one database, hundreds of terabytes belong in object storage, and gigabytes per second of outbound traffic belong on a CDN.

  • 1 million new photos a day x 2 MB = 2 TB a day, about 730 TB a year
  • 100 million short links x 500 bytes = 50 GB, which fits on one database
  • 6 000 requests per second x 200 KB pages = 1.2 GB per second, a job for a CDN
  • Add replication: three copies of 730 TB is over 2 PB

Key takeaways

  • Average requests per second = daily requests / 86 400; then multiply by a peak factor of 2 to 5
  • Estimate reads and writes separately; the ratio decides where you invest
  • Storage = items x size x retention x replicas, and it grows every day
  • Order-of-magnitude accuracy is enough to choose the right architecture

Sign in to track lessons and earn badges.

How a web request travelsLatency numbers every designer should know

Coming up

Course: 0/16 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 1/10Design a URL ShortenerEstimate peak redirects per second and size a stateless API tier behind a load balancer to serve them.Easy
  2. 2/10Design a Session StoreMove login sessions out of the web tier into a replicated in-memory store with TTLs and a clear fallback.
Easy
All 10 challenges →