Design a service that turns long URLs into short links, redirects on access, and reports click counts.
How to approach it
Capacity estimation converts product numbers into engineering pressure. Go from daily active users to queries-per-second (QPS ≈ DAU × actions ÷ 86,400, with a 2–3× peak), then to storage (writes/day × payload × retention) and bandwidth (QPS × response size). You only need the order of magnitude — it tells you whether to design for read scaling, write scaling, or storage first.
Assumptions
| Assumption | Value |
|---|---|
| New links/day | 10M |
| Read:write ratio | 100:1 |
| Avg URL size | 500 B |
| Retention | 5 years |
Derived numbers
| Quantity | Estimate |
|---|---|
| Write QPS | ~115/s |
| Read QPS | ~11.5K/s |
| Rows in 5y | ~18B |
| Storage | ~9 TB |
Note
Read QPS and the key-space size drive the design — not write throughput.