A design for 100 requests per second and a design for 100,000 requests per second look nothing alike. The first fits on one server. The second needs load balancers, caches, replicas and probably shards. So the first five minutes of any design should go to arithmetic, not architecture.
You don't need precision. You need the right order of magnitude, so you know whether a component is comfortable, close to its limit, or hopeless.
From users to requests per second
Start from people and work toward machines. The formula almost every estimate uses:
There are 86,400 seconds in a day. Round it to 100,000 and the mental math gets easy: one million requests a day is about 12 per second, and one billion a day is about 12,000 per second.
A worked example
Say you're designing a photo feed with 10 million daily users. Each user loads about 20 feed pages and posts 2 photos a day.
| Quantity | Math | Result |
|---|---|---|
| Reads per day | 10M × 20 | 200M |
| Average read RPS | 200M ÷ 86,400 | ≈ 2,300/s |
| Peak read RPS (×3) | 2,300 × 3 | ≈ 7,000/s |
| Writes per day | 10M × 2 | 20M |
| Peak write RPS (×3) | 20M ÷ 86,400 × 3 | ≈ 700/s |
Two facts fall out straight away. The system is read-heavy (10:1), so caching and read replicas will matter more than write scaling. And 700 writes per second is within reach of one well-tuned database, so you probably don't need sharding on day one.
Storage and bandwidth
The same arithmetic sizes your disks and your network. If each photo record is 1 KB of metadata and the image itself is 500 KB:
Now you know the images belong in object storage behind a CDN, not in the database, and that serving them from your own servers would need serious network capacity.
Numbers worth memorising
These are rounded orders of magnitude. Real hardware varies, but the ratios between rows are what matter.
| Operation | Rough time |
|---|---|
| L1 CPU cache reference | ~1 ns |
| L2 CPU cache reference | ~4 ns |
| Read from main memory | 100 ns |
| Random read from SSD | ~100 µs |
| Round trip inside a data centre | ~0.5 ms |
| Cache GET over the network (Redis, Memcached) | ~1 ms |
| Indexed database query | 1–10 ms |
| Round trip, US East ↔ Europe | ~80 ms |
| Round trip, US ↔ Australia | ~150–200 ms |
Each step down the table is 10 to 1,000 times slower than the one above. L1 is about 100 times faster than main memory, memory is about 1,000 times faster than SSD, and SSD is far faster than going across the planet. Those ratios explain why caches and CDNs exist.
Capacity of common building blocks
Ballpark throughput for one node of each, assuming simple requests:
- Web or app server: hundreds to a few thousand requests per second, depending on how much work each request does.
- Relational database (PostgreSQL, MySQL): thousands to tens of thousands of simple indexed queries per second. Writes are more expensive than reads.
- In-memory cache (Redis): on the order of 100,000 operations per second.
- Message broker partition (Kafka): tens of megabytes per second.
Averages lie: think in percentiles
If 99 requests take 10 ms and one takes 2 seconds, the average is about 30 ms, which describes nobody's experience. Percentiles describe it better. p95 is the latency 95% of requests beat, and p99 is the latency 99% beat. A page that makes 20 backend calls hits the p95 of at least one of them most of the time, so the tail is what users feel.
Leave headroom
Never size a component to run at 100% at peak. Response time climbs steeply as utilisation approaches 1 (see load balancing for the math). A common target is 60–75% at expected peak, which leaves room for spikes and for losing a machine.
In the game: one app server handles 1,000 req/s and one database handles 1,500 reads/s and 600 writes/s. The level brief gives you peak traffic and the read share, so you can do the same arithmetic before placing anything. In Flash Sale, comparing peak writes (~950/s) with average writes (under 500/s) is the whole puzzle.
Interview checklist
- State daily active users and actions per user, then derive average and peak RPS.
- Split reads from writes and state the ratio.
- Estimate storage per year and egress bandwidth.
- Name which component the numbers stress first.
- Round aggressively and say you're rounding.
Level 1: Hello, World
Put this into practice against live traffic. Your progress in the game is saved in your browser.
Play level 1Further reading
- Martin Kleppmann, Designing Data-Intensive Applications (O'Reilly). The standard book on replication, partitioning and consistency.
- Site Reliability Engineering, Google's free book on running reliable systems.
- The Amazon Builders' Library: practical articles on timeouts, retries, caching and load shedding.
- The System Design Primer: a broad, community-maintained overview.