System Design Back-of-the-Hand Calculations
🚀 System Design Back-of-the-Hand Calculations
Memorize these. They are enough to estimate 90% of interview questions.
🌐 Networking
| Metric |
Approximate Value |
Remember |
| 1 Gbps |
125 MB/s |
Divide by 8 |
| 10 Gbps |
1.25 GB/s |
Common server NIC |
| 100 Gbps |
12.5 GB/s |
Data center |
| MTU |
1500 Bytes |
Ethernet |
| TCP MSS |
1460 Bytes |
Payload |
| Same AZ RTT |
<1 ms |
Extremely fast |
| Same Region RTT |
1–5 ms |
AWS/GCP |
| Cross Region RTT |
50–200 ms |
Depends on geography |
💾 Storage Latency
| Storage |
Latency |
| CPU Cache |
<1 ns |
| RAM |
100 ns |
| NVMe SSD |
50–200 μs |
| SATA SSD |
0.1–1 ms |
| HDD |
5–15 ms |
Memory → SSD → HDD
CPU Cache
↓ 100x
RAM
↓ 1000x
SSD
↓ 100x
HDD
⚡ CPU
| Metric |
Approx |
| CPU Frequency |
3 GHz |
| Cycles/sec |
3 Billion |
| One Cycle |
0.33 ns |
| Simple Operations/Core |
~100 Million/sec |
🧠 Memory
| Data |
Size |
| Integer |
4 Bytes |
| Long |
8 Bytes |
| Pointer (64-bit) |
8 Bytes |
| UUID |
16 Bytes |
| Timestamp |
8 Bytes |
Rule:
100 Bytes of useful data
↓
150–250 Bytes in RAM
(Object overhead + alignment)
🗄 Database
| Operation |
Typical Latency |
| Redis GET |
<1 ms |
| Indexed SQL Query |
2–10 ms |
| Join Query |
10–100 ms |
| Cold Query |
100–500 ms |
📦 Typical Payload Sizes
| Payload |
Size |
| JSON API |
1 KB |
| User Profile |
5–10 KB |
| Image Metadata |
20 KB |
| JPEG |
500 KB–5 MB |
| Video |
100 MB+ |
👥 Human Perception
| Delay |
User Feels |
| 16 ms |
60 FPS |
| 50 ms |
Instant |
| 100 ms |
Fast |
| 200 ms |
Slight Delay |
| 500 ms |
Slow |
| 1 sec |
Waiting |
| 10 sec |
Many users leave |
📈 Availability
| SLA |
Downtime/Year |
| 99% |
3.65 Days |
| 99.9% |
8.8 Hours |
| 99.99% |
53 Minutes |
| 99.999% |
5.3 Minutes |
🔥 RPS Estimation
RPS = Requests per day / 86,400
| Daily Requests |
Approx RPS |
| 1 Million |
12 |
| 10 Million |
116 |
| 50 Million |
580 |
| 100 Million |
1,160 |
| 1 Billion |
11,600 |
🌊 Bandwidth
Formula
Bandwidth = RPS × Response Size
| RPS |
Response |
Bandwidth |
| 1K |
1 KB |
1 MB/s |
| 10K |
1 KB |
10 MB/s |
| 10K |
20 KB |
200 MB/s |
| 100K |
10 KB |
1 GB/s |
📝 Logs
Assume
1 Log = 1 KB
| Traffic |
Storage |
| 1K RPS |
86 GB/day |
| 10K RPS |
864 GB/day |
| 100K RPS |
8.6 TB/day |
🖼 CDN
| Image Size |
Views |
Transfer |
| 500 KB |
1 Million |
~500 TB |
| 1 MB |
1 Million |
~1 PB |
📖 Cache
Typical production
| Metric |
Value |
| Reads |
90–99% |
| Writes |
1–10% |
| Cache Hit Rate |
95–99% |
Average latency example
95 × 1ms
+
5 × 20ms
↓
≈2 ms
🏗 Replication
Primary
│
──────────────
│ │
Replica Replica
Reads
≈3× throughput
Writes
Still limited by Primary
🧩 Sharding
1 TB
↓
10 Shards
↓
100 GB each
Easy estimation.
🔑 Consistent Hashing
100 Servers
↓
101 Servers
↓
~1% Keys Move
💬 Message Queues
10K Messages/sec
×
1 KB
↓
10 MB/sec
Per day
≈864 GB
🌸 Bloom Filter
| False Positive |
Bits per Item |
| 1% |
~10 Bits |
| 0.1% |
~15 Bits |
🧮 Quick Mental Math
| Remember |
Value |
| 1 Day |
86,400 sec |
| 1 KB |
10³ Bytes |
| 1 MB |
10⁶ Bytes |
| 1 GB |
10⁹ Bytes |
| 1 Million |
10⁶ |
| 1 Billion |
10⁹ |
RPS
=
Requests / 86,400
Bandwidth
=
RPS × Response Size
Storage
=
Objects × Size
Memory
=
Objects × Size × 2
Cache Hit
=
(Hit × Cache Latency + Miss × DB Latency)
/ Total Requests
Replication
=
Read Scaling Only
Sharding
=
Data / Number of Shards
🎯 The 15 Numbers Worth Memorizing
| # |
Value |
| 1 |
1 Day = 86,400 sec |
| 2 |
1 Gbps = 125 MB/s |
| 3 |
RAM = 100 ns |
| 4 |
NVMe = 100 μs |
| 5 |
HDD = 10 ms |
| 6 |
Redis GET = <1 ms |
| 7 |
Indexed DB = 2–10 ms |
| 8 |
JSON API = 1–10 KB |
| 9 |
99.9% = 8.8 h/year |
| 10 |
99.99% = 53 min/year |
| 11 |
99.999% = 5.3 min/year |
| 12 |
1M requests/day = 12 RPS |
| 13 |
1 KB log @ 1000 RPS = 86 GB/day |
| 14 |
Cache hit target = 95–99% |
| 15 |
100 ms feels fast, 1 s feels like waiting |