๐งฎ Estimation Cheatsheet (back-of-the-envelope)
Powers & time
- 2^10 โ 1 thousand (KB), 2^20 โ 1 million (MB), 2^30 โ 1 billion (GB), 2^40 โ 1 trillion (TB)
- 1 day โ 86,400 s โ 10^5 s. 1 month โ 2.5 ร 10^6 s. 1 year โ 3 ร 10^7 s
- 1M requests/day โ 12 QPS average. Peak โ 2โ5ร average (10ร+ for flash sales)
Rough capacities (per node, order of magnitude)
| Component | Throughput |
|---|---|
| Stateless app server (simple API) | 1kโ10k RPS |
| PostgreSQL (simple indexed reads, good hardware) | 10kโ50k QPS; writes ~5kโ20k TPS |
| Redis | 100k+ ops/s |
| Kafka broker | 100s of MB/s |
| Single SSD | 100k+ IOPS |
| 1 Gbps network | ~125 MB/s |
Sizes
- UUID 16 B ยท long 8 B ยท timestamp 8 B ยท typical row 100 Bโ1 KB ยท tweet ~300 B ยท image ~200 KBโ2 MB ยท 1 min video (720p) ~50 MB
Availability
| SLA | Downtime/year | Downtime/month |
|---|---|---|
| 99% | 3.65 days | 7.2 h |
| 99.9% | 8.76 h | 43.8 min |
| 99.99% | 52.6 min | 4.4 min |
| 99.999% | 5.26 min | 26 s |
| Serial dependencies multiply: 99.9% ร 99.9% = 99.8%. |
Template
- DAU โ actions/user/day โ requests/day โ รท10^5 โ avg QPS โ ร peak factor
- Read:write ratio
- Storage = objects/day ร size ร retention (ร replication factor 3)
- Bandwidth = QPS ร payload
- Cache = 20% of hot daily data (80/20 rule)
- Servers โ peak QPS รท per-server QPS (+ headroom 30โ50%)
Latency numbers: see Optimization Principles.
๐งช Labs (๐ข warm-up โ ๐ก core โ ๐ด hard โ โซ boss)
- ๐ข Daily 5-min Fermi drill (log it in the drill log)
- ๐ก Estimate, then measure: Orbitโs DB growth per 1M runs; tokens/day per tenant
๐ง Cognitive tasks
- Explain which estimate actually changed a design decision (most donโt!)
๐ฐ๏ธ Orbit integration
- Capacity plan for Orbit v5 - Scale & Polish
Go deeper
๐ง Cognitive Drills