Capacity planner
Users to QPS, bandwidth, storage, servers and cache, step by step.
Calculated in your browser
Answer the questions to plan your system.
Start from an example
How many people use it each day?
What do they do?
Each thing a user does sends a request. Reads fetch data; writes save it.
Type
Load feed: read or write
Sizes: 1 KB sent · 20 KB returned
Request size (sent by the user) unit
Response size (sent back) unit
Type
View profile: read or write
Sizes: 1 KB sent · 15 KB returned
Request size (sent by the user) unit
Response size (sent back) unit
Type
Like a post: read or write
Sizes: 500 B sent · 200 B returned · 100 B saved
Request size (sent by the user) unit
Response size (sent back) unit
Saved per write unit
Record plus any photo or file you keep.Type
Comment: read or write
Sizes: 1 KB sent · 500 B returned · 500 B saved
Request size (sent by the user) unit
Response size (sent back) unit
Saved per write unit
Record plus any photo or file you keep.Type
Upload a photo: read or write
Sizes: 2 MB sent · 1 KB returned · 2.5 MB saved
Request size (sent by the user) unit
Response size (sent back) unit
Saved per write unit
Record plus any photo or file you keep.How spiky is the traffic?
Growth20% a year for 3 years
How long do you keep data?
Copies, compression and growth3 copies
Servers and cache
Server and cache sizes1k req/s per server · 64 GB per cache node
Memory per cache node unit
Your system at peak, 3 years from now
Users1.09M req/s at peak
Load balancerspreads the load
1,812 app servers
Cache47.5 TB · 743 nodes
Database & storage2.45 EB
Traffic today
- 500Mpeople a day
- 18.1Brequests a day
- 209kper second, average
- 628kper second at peak
Reads 69.1%434k/s at peakWrites 30.9%194k/s at peak
Storage
- 251 TBnew data a day
- 681 PBafter 5 years
- 2.45 EBdisk to buy
What to improve
Suggestions from your numbers: common fixes, not guarantees.
- 194k writes a second at peakMore than one database primary usually takes comfortably: plan to shard by a key such as user ID.
- High loadSpread requests over many stateless app servers behind a load balancer, and plan the database tier for this from day one.
- 66.3 Gbps going outServe static files and media from a CDN so this traffic doesn't hit your servers.
- Files are 99.7% of the dataKeep photos and videos in object storage (S3-style) and serve them through a CDN. Put only the small records in the database.
- 2.45 EB is more than any one machine holdsSplit data across many machines (sharding) and move old, rarely read data to cheaper cold storage.
- 743 cache nodesA very large cache: cache only the hottest items, and serve media from a CDN rather than memory.
Say it in an interview
For 500M daily users, peak load is about 628k requests a second today and 1.09M in 3 years. At 1k per server and 60% busy, that needs about 1,812 app servers including 2 spare. We'd write 251 TB a day, so about 2.45 EB of disk over 5 years with 3 copies, and a cache of about 47.5 TB for the hottest 20% of reads.
Details
Peak in 3 years1.09Mwith 20% yearly growth
Data in at peak59.9 Gbpsusers → servers
Data out at peak66.3 Gbps239 TB a day
Breakdown by action
| Action | Type | Per day | Average/s | Peak/s |
|---|---|---|---|---|
| Load feed | Read | 10B | 116k | 347k |
| View profile | Read | 2.5B | 28.9k | 86.8k |
| Like a post | Write | 5B | 57.9k | 174k |
| Comment | Write | 500M | 5.79k | 17.4k |
| Upload a photo | Write | 100M | 1.16k | 3.47k |
Show the maths
- Requests per day
500M users × 36.2 requests each= 18.1B - Average QPS
18.1B ÷ 86,400 seconds in a day= 209k - Peak QPS
209k × 3= 628k - Peak in 3 years
628k × (1 + 20%)^3= 1.09M - Peak data out
Σ peak QPS × response size= 66.3 Gbps
Show the maths
- Data per year
251 TB a day × 365, growing 20% a year= 92 PB + 110 PB + 132 PB + 158 PB + 190 PB - Raw total
sum of 5 years= 681 PB - Compressed
681 PB ÷ 1= 681 PB - With overhead
× (1 + 20%)= 817 PB - Disk to buy
× 3 copies= 2.45 EB - Usable per server
1k/s × 60%= 600/s - App servers
⌈1.09M ÷ 600⌉ + 2 spare= 1,812 - Cache memory
238 TB read a day × 20%= 47.5 TB - Cache nodes
⌈47.5 TB ÷ 64 GB⌉= 743
The cache estimate counts requests, not unique items, so treat it as an upper bound.
Test it in the simulator
Opens your current simulator design at 628k requests/sec (69.1% reads). Then press Simulate to find the bottleneck.
Key ideas
- Users → requests: daily users × what they do, then the busiest moment and growth.
- Requests → servers: peak ÷ what one server handles at a safe load, plus spares.
- Writes → storage over the years you keep data; reads → cache, sized for the hottest share.
Estimates for planning and interviews, not production measurements. Decimal units: 1 KB = 1,000 bytes.