How big does each part of my system need to be so it can handle the expected workload with acceptable performance and cost?
“How big does each part of my system need to be so it can handle the expected workload with acceptable performance and cost?”To do that, you typically estimate five classes of numbers:
r | What you estimate | Why it matters | Typical outputs |
---|---|---|---|
1 | Traffic volumes | Drives capacity decisions everywhere else | 1. Daily active users (DAU) 2. Requests per second (RPS/QPS) 3. Peak vs. average load factors |
2 | Data size & growth | Guides storage engines, sharding strategy, and retention policies | 1. Bytes/row or object 2. Total rows/objects per day 3. Storage after 1year, 3 years |
3 | Throughput & bandwidth | Determines network links, replication costs, CDN usage | 1. Ingest MB/s 2. Egress MB/s to clients 3. Replication traffic between DCs |
4 | Latency budgets | Shapes caching layers, queue depths, timeouts | 1. Client‑visible SLA (e.g., ‑‑p99 < 200ms) 2. Per‑hop allocation (frontend, cache, DB) |
5 | Hardware / cost footprint | Justifies design trade‑offs and shows business awareness | 1. No. app servers, DB shards, cache nodes 2. Monthly cloud bill rough‑cut |
Power | Exact Value | Approx Value | Bytes |
---|---|---|---|
7 | 128 | ||
8 | 256 | ||
10 | 1024 | 1 thousand | 1 KB |
16 | 65,536 | 64 KB | |
20 | 1,048,576 | 1 million | 1 MB |
30 | 1,073,741,824 | 1 billion | 1 GB |
32 | 4,294,967,296 | 4 GB | |
40 | 1,099,511,627,776 | 1 trillion | 1 TB |
Operation | Latency (ns) | Latency (us) | Latency (ms) | Notes |
---|---|---|---|---|
L1 cache reference | 0.5 | — | — | |
Branch mispredict | 5 | — | — | |
L2 cache reference | 7 | — | — | 14x L1 cache |
Mutex lock/unlock | 25 | — | — | |
Main memory reference | 100 | — | — | 20x L2 cache, 200x L1 cache |
Compress 1K bytes with Zippy | 10,000 | 10 | — | |
Send 1 KB over 1 Gbps network | 10,000 | 10 | — | |
Read 4 KB randomly from SSD* | 150,000 | 150 | — | ~1GB/sec SSD |
Read 1 MB sequentially from memory | 250,000 | 250 | — | |
Round trip within same datacenter | 500,000 | 500 | — | |
Read 1 MB sequentially from SSD* | 1,000,000 | 1,000 | 1 | ~1GB/sec SSD, 4X memory |
HDD seek | 10,000,000 | 10,000 | 10 | 20x datacenter roundtrip |
Read 1 MB sequentially from 1 Gbps net | 10,000,000 | 10,000 | 10 | 40x memory, 10X SSD |
Read 1 MB sequentially from HDD | 30,000,000 | 30,000 | 30 | 120x memory, 30X SSD |
Send packet CA → Netherlands → CA | 150,000,000 | 150,000 | 150 |
Availability % | Downtime per day | Downtime per week | Downtime per month | Downtime per year |
---|---|---|---|---|
99% | 14.40 minutes | 1.68 hours | 7.31 hours | 3.65 days |
99.99% | 8.64 seconds | 1.01 minutes | 4.38 minutes | 52.60 minutes |
99.999% | 864.00 milliseconds | 6.05 seconds | 26.30 seconds | 5.26 minutes |
99.9999% | 86.40 milliseconds | 604.80 | 2.63 seconds | 31.56 seconds |