Appendix A: Quick Reference Tables
These tables are the cheat sheets you will reach for during estimation exercises, interview preparation, and real-world capacity planning. Bookmark this section.
Powers of Two Table
| Power | Exact Value | Approximate | Common Name |
|---|---|---|---|
| 2^7 | 128 | ||
| 2^8 | 256 | ||
| 2^10 | 1,024 | 1 Thousand | 1 KB |
| 2^16 | 65,536 | 65 Thousand | 64 KB |
| 2^20 | 1,048,576 | 1 Million | 1 MB |
| 2^30 | 1,073,741,824 | 1 Billion | 1 GB |
| 2^32 | 4,294,967,296 | 4 Billion | 4 GB (max 32-bit address space) |
| 2^40 | 1,099,511,627,776 | 1 Trillion | 1 TB |
| 2^50 | ~1.13 Quadrillion | 1 Quadrillion | 1 PB |
Quick conversions:
1 KB = 1,024 bytes.
1 MB = 1,024 KB.
1 GB = 1,024 MB.
1 TB = 1,024 GB.
1 PB = 1,024 TB.
For estimation, treat 1 KB as 1,000 bytes and multiply cleanly.
Precision does not matter for back-of-the-envelope calculations.
Latency Numbers Every Programmer Should Know
| Operation | Approximate Latency |
|---|---|
| L1 cache reference | 0.5 ns |
| Branch mispredict | 5 ns |
| L2 cache reference | 7 ns |
| Mutex lock/unlock | 25 ns |
| Main memory (RAM) reference | 100 ns |
| Compress 1 KB with Snappy | 3 μs |
| Send 1 KB over 1 Gbps network | 10 μs |
| Read 4 KB randomly from SSD | 150 μs |
| Read 1 MB sequentially from memory | 250 μs |
| Round trip within same datacenter | 500 μs (0.5 ms) |
| Read 1 MB sequentially from SSD | 1 ms |
| HDD disk seek | 10 ms |
| Read 1 MB sequentially from HDD | 20 ms |
| Send packet CA → Netherlands → CA | 150 ms |
The key insight: memory is roughly 100,000x faster than disk.
SSD is roughly 100x faster than HDD.
Same-datacenter network is roughly 300x slower than memory but 20x faster than cross-continent network. These ratios explain why caching, CDNs, and data locality matter so much.
Common System Throughput Benchmarks
| Component | Typical Throughput |
|---|---|
| Single web server (Node.js / Python) | 1,000-5,000 requests/second |
| Single web server (Go / Java / Rust) | 10,000-50,000 requests/second |
| Single Redis instance | 100,000-200,000 operations/second |
| Single PostgreSQL instance | 5,000-20,000 queries/second (depends on query complexity) |
| Single MySQL instance | 5,000-20,000 queries/second |
| Single Cassandra node | 10,000-50,000 writes/second |
| Single Kafka broker | 200,000-500,000 messages/second |
| Single Elasticsearch node | 5,000-15,000 queries/second |
| Nginx (reverse proxy) | 50,000-100,000 requests/second |
These are rough guidelines, not exact numbers.
Actual throughput depends on hardware, query complexity, payload size, and configuration.
Use them for order-of-magnitude estimation: "If one server handles 5,000 QPS and we need 50,000 QPS, we need approximately 10 servers."
Storage and Bandwidth Estimation Cheat Sheet
Common data sizes:
| Data Type | Approximate Size |
|---|---|
| Single character (ASCII) | 1 byte |
| Single character (UTF-8) | 1-4 bytes |
| Short text message (tweet, SMS) | 200-300 bytes |
| Typical JSON API response | 1-10 KB |
| Email (text only) | 5-50 KB |
| Web page (HTML + CSS) | 100-500 KB |
| High-resolution photo (compressed) | 2-5 MB |
| 1 minute of MP3 audio | 1 MB |
| 1 minute of HD video (compressed) | 100-150 MB |
| 1 minute of 4K video (compressed) | 300-500 MB |
Estimation formulas:
Storage = items × average size × retention period
Bandwidth = requests/second × average response size
Daily volume = items/day × average size
Monthly volume = daily volume × 30
Quick time conversions:
Seconds in a day: 86,400 (~100,000 for estimation).
Seconds in a month: ~2.5 million.
Seconds in a year: ~31.5 million (~30 million for estimation).
Availability Numbers and SLA Targets
| Availability | Downtime Per Year | Downtime Per Month | Downtime Per Week |
|---|---|---|---|
| 99% (two nines) | 3.65 days | 7.31 hours | 1.68 hours |
| 99.5% | 1.83 days | 3.65 hours | 50.4 minutes |
| 99.9% (three nines) | 8.77 hours | 43.8 minutes | 10.1 minutes |
| 99.95% | 4.38 hours | 21.9 minutes | 5.04 minutes |
| 99.99% (four nines) | 52.6 minutes | 4.38 minutes | 1.01 minutes |
| 99.999% (five nines) | 5.26 minutes | 26.3 seconds | 6.05 seconds |
Combined availability: Sequential (both must work): multiply availabilities. Two services at 99.9% each: 99.9% × 99.9% = 99.8%. Parallel (one must work): 1 - (1-A₁)(1-A₂). Two services at 99.9% each: 1 - (0.001 × 0.001) = 99.9999%.