Notes
Handy numbers
First, a few round numbers. A day is about a hundred thousand seconds. A year is about thirty million. So a million requests a day is roughly twelve per second, and a billion a day is about twelve thousand per second. Peak traffic is usually two to three times the average. Round aggressively; one significant digit is enough.
1 day = 86,400 s ≈ 10⁵ s 1 month ≈ 2.5 × 10⁶ s 1 year ≈ 3 × 10⁷ s 1 million req/day ≈ 12 rps 1 billion req/day ≈ 12,000 rps KB 10³ · MB 10⁶ · GB 10⁹ TB 10¹² · PB 10¹⁵ peak ≈ 2–3× average
Traffic
Worked example: a photo app with ten million daily users. Each views fifty photos a day: five hundred million reads, divided by a hundred thousand seconds, is about five thousand reads per second, fifteen thousand at peak. Each uploads one photo every five days: two million writes a day, about twenty per second. Two hundred and fifty to one: very read-heavy.
10M daily active users each views 50 photos/day → 500M reads/day → 500M / 10⁵ ≈ 5,000 rps → peak ×3 ≈ 15,000 rps each uploads 0.2 photos/day → 2M writes/day ≈ 20 wps read:write ≈ 250:1 → read-heavy
Storage
Storage: two million photos a day at two megabytes each is four terabytes a day, about one and a half petabytes a year, more with replication. But the metadata, a kilobyte per photo, is only two gigabytes a day. That split is a design decision: photos go to object storage, and the metadata fits comfortably in a database.
2M photos/day × 2 MB = 4 TB/day × 365 ≈ 1.5 PB/year × 3 replicas ≈ 4.5 PB metadata: 2M × 1 KB = 2 GB/day ≈ 0.7 TB/year → photos in object storage → metadata fits a sharded DB
Bandwidth
Bandwidth: five thousand photo views a second at two hundred kilobytes each is a gigabyte per second, around eight gigabits, and three times that at peak. That's the number that tells you to serve images through a CDN and resize them to the screen, instead of from your own servers.
5,000 photo views/s × 200 KB (thumbnail-sized) = 1 GB/s ≈ 8 Gbps average peak ×3 ≈ 25 Gbps → serve images from a CDN → resize to the screen size uploads: 20/s × 2 MB = 40 MB/s
Servers and cache
Servers: if one app server handles around two thousand simple requests a second, fifteen thousand at peak needs about eight, so run twelve across zones for headroom. Cache: keeping the hottest twenty percent of a day's metadata is about a hundred gigabytes, a small Redis cluster. Suddenly the design has numbers behind it.
one app server ≈ 1,000–5,000 rps (simple, mostly cached reads) peak 15,000 rps / ~2,000 ≈ 8 servers → run 12 (N+1, zones) cache: hot 20% of a day's metadata reads 500M × 1 KB × 0.2 ≈ 100 GB → a small Redis cluster
So what
That's the real point: every number should lead to a decision. Two hundred fifty to one reads means caching, replicas and a CDN. One and a half petabytes a year means object storage with cheaper cold tiers. Twenty writes a second means a single primary database handles the metadata writes easily.
- 250:1 reads → cache, replicas,
- CDN; optimise the read path
- 1.5 PB/year → object storage,
- lifecycle to cold tiers
- 20 writes/s → one primary DB
- is fine for metadata writes
- 8 Gbps → CDN, not origin
- 100 GB hot set → Redis
Mistakes
Common mistakes: being too precise, forgetting the peak factor, forgetting replication, and mixing up bits and bytes, a factor of eight. The biggest one is computing numbers that don't change the design. Do only the math that matters, and say every assumption out loud so the interviewer can correct it.
- too precise: 86,400 not needed
- forgetting peak vs average
- forgetting replication (×3)
- mixing bits and bytes
- (Gbps vs GB/s: ×8)
- calculating things that do
- not change the design
- silently: always say
- the assumptions out loud
Say it like this
In the interview, spend two to four minutes right after the requirements. Daily users and actions, average and peak requests per second, read to write ratio, storage per year split into data and metadata, bandwidth if there's media, and a rough server and cache count. Then always finish with: 'so this means…'
- 2–4 minutes, after requirements
- state DAU and actions/day
- avg + peak rps, read:write
- storage/year (data vs metadata)
- bandwidth if media
- servers + cache size roughly
- then: "so this means…"