System Architecture Sizing
System Design & Capacity Planning Calculator
Calculate essential architecture metrics for system design interviews and production infrastructure: Throughput (QPS), Ingress/Egress Bandwidth, 5-Year Storage, and 80/20 Cache RAM Sizing.
Production Workload Presets:
1. TRAFFIC & USER BEHAVIOR
2. PAYLOAD SIZES (KB)
3. STORAGE REPLICATION & CACHING
THROUGHPUT (QPS)
Average QPS
118,055.55
Peak QPS (2.5x)
295,138.88
Write QPS: 2,314.81 Read QPS: 115,740.74 Read/Write Ratio: 50 : 1
NETWORK BANDWIDTH
Ingress (Inbound Writes)
27.78 Mbps (0.028 Gbps)
Egress (Outbound Reads)
9259.26 Mbps (9.259 Gbps)
MULTI-YEAR STORAGE GROWTH
Daily Growth
1,072.88 GB
1-Month Storage
32,186.4 GB
1-Year Storage
382.42 TB
5-Year Storage
1,912.1 TB
IN-MEMORY CACHE SIZING (80/20 RULE)
Required Redis RAM
19,073.49 GB
Recommended Cluster Architecture:
cache.r6g.xlarge (26GB RAM x 734 nodes)
The Standard System Design Estimation Formula
1. Converting Daily Volume to QPS
There are 86,400 seconds in a day (approximated to $10^5$ seconds in back-of-the-envelope calculations):
``` QPS = Total Daily Requests / 86,400 Peak QPS = Average QPS × Peak Factor (typically 2.0x to 3.5x) ```2. The 80/20 Caching Principle
In production, 20% of content (the hot keys) generates 80% of total read traffic. Sizing your Redis or Memcached cluster to hold 20% of your daily read payload ensures that 80%+ of incoming queries are served in sub-millisecond RAM latency without hitting your database disks.
3. Accounting for the "Hidden Storage Multiplier"
Raw user data is only a fraction of total disk footprint. Production databases must factor in:
- Replication Factor (3x): 1 Primary + 2 Standby/Read Replicas across multiple availability zones.
- B-Tree Index Overhead (+20% to +30%): Secondary indexes, primary keys, and foreign key tables.
- WAL & Binlog Retention (+10%): Point-in-time recovery transaction logs.