Appendix A: Benchmark Data and Latency Tables
Empirical Results and Formulas
This appendix provides reference data for latency, throughput, and cost calculations referenced throughout the series. All measurements represent typical values as of 2024-2025 unless otherwise noted.
Physical Latency Constants
Speed of Light in Various Media
Vacuum: 299,792 km/s
Fiber optic cable: ~200,000 km/s (67% of c)
Copper (electrical signal): ~200,000 km/s
One-way latency formula:
latency_ms = (distance_km / 200,000) × 1000
Geographic Distances and Minimum Latencies
Location Pair Distance (km) Min RTT (ms)
---------------------------------------------------------
Same rack 0.01 0.0001
Same datacenter floor 0.1 0.001
Same datacenter 1 0.01
Same availability zone 10 0.1
Metro area (SF Bay) 50 0.5
US East to West 4,100 41
London to Moscow 2,500 25
Sydney to Perth 3,300 33
NY to London 5,600 56
SF to Tokyo 8,300 83
London to Singapore 10,800 108
Sydney to London 17,000 170
Note: These are theoretical minimums. Actual latencies are 2-5× higher
due to routing, switching, and protocol overhead.
Network Latency Benchmarks
Typical Observed Latencies (P50)
Operation Latency
-------------------------------------------------
L1 cache reference 0.5 ns
L2 cache reference 7 ns
Main memory reference 100 ns
SSD random read 150 μs
HDD seek 10 ms
TCP handshake (same DC) 0.5 ms
TCP handshake (cross-region US) 70 ms
TCP handshake (transoceanic) 160 ms
TLS 1.3 handshake (same DC) 1 ms
TLS 1.3 handshake (cross-region) 140 ms
HTTP request (same DC) 2 ms
HTTP request (cross-region) 90 ms
HTTP request (transoceanic) 200 ms
Database query (local) 1-5 ms
Database query (same region) 5-15 ms
Database query (cross-region) 80-150 ms
Tail Latency (P99)
Operation P50 P99 P99/P50 Ratio
-----------------------------------------------------------------
Local SSD read 150 μs 500 μs 3.3×
Same-region DB query 5 ms 15 ms 3.0×
Cross-region DB query 90 ms 300 ms 3.3×
CDN cache hit 10 ms 40 ms 4.0×
CDN cache miss 150 ms 800 ms 5.3×
Key insight: P99 latencies are typically 3-5× worse than P50.
For cross-region operations, P99 can be 10× worse due to
network variance and retries.
Storage Performance Benchmarks
Storage Media Characteristics
Media Type Read IOPS Write IOPS Seq Read Seq Write Latency
----------------------------------------------------------------------------------
DDR4 RAM 1,000,000+ 1,000,000+ 50 GB/s 50 GB/s 100 ns
NVMe SSD 500,000 300,000 7 GB/s 5 GB/s 100 μs
SATA SSD 100,000 90,000 550 MB/s 520 MB/s 200 μs
HDD 7200 RPM 150 150 150 MB/s 150 MB/s 10 ms
HDD 5400 RPM 100 100 100 MB/s 100 MB/s 15 ms
Cloud storage:
AWS EBS gp3 16,000 16,000 1,000 MB/s 1,000 MB/s 1 ms
AWS EBS io2 64,000 64,000 4,000 MB/s 4,000 MB/s 0.25 ms
Write Amplification Factors
Scenario Write Amplification Factor
---------------------------------------------------------------------
Single node, no replication 1×
3-node cluster, quorum replication 3×
5-node cluster, quorum replication 5×
10-node cluster, full replication 10×
100-node cluster, full replication 100×
With LSM-tree compaction:
Base replication: 3×
Compaction overhead: 2-10×
Total: 6-30×
Formula for N-node cluster with full replication:
physical_writes = application_writes × N
Formula for N-node cluster with quorum Q:
physical_writes = application_writes × Q (for durability)
+ eventual_propagation_to_(N-Q)_nodes
Bandwidth and Cost
Data Transfer Costs (2024-2025)
Provider Same Region Cross-Region Internet Egress
----------------------------------------------------------
AWS $0.01/GB $0.02-0.08/GB $0.09-0.05/GB*
GCP $0.01/GB $0.01-0.08/GB $0.12-0.08/GB*
Azure Free $0.02/GB $0.087-0.051/GB*
DO Included Included Included**
Linode Included Included Included**
* Volume discounts apply
** Up to allocation (typically 1-20TB/month depending on plan)
Bandwidth Consumption Patterns
Application Type Avg Request Requests/Sec Bandwidth
----------------------------------------------------------------
REST API 1 KB 10,000 10 MB/s
GraphQL API 5 KB 5,000 25 MB/s
Image hosting 500 KB 1,000 500 MB/s
Video streaming 5 MB 500 2.5 GB/s
Gaming (realtime) 100 bytes 50,000 5 MB/s
IoT telemetry 500 bytes 100,000 50 MB/s
Monthly bandwidth calculation:
monthly_GB = (bytes_per_request × requests_per_second
× 3600 × 24 × 30) / 1,073,741,824
Database Performance Benchmarks
Single-Node Database Throughput
Database Read IOPS Write IOPS Latency (P50) Notes
-------------------------------------------------------------------
Redis 100,000 100,000 <1 ms In-memory
PostgreSQL 50,000 20,000 2-5 ms SSD
MongoDB 40,000 15,000 3-7 ms SSD
Cassandra 30,000 30,000 5-10 ms Write-optimized
MySQL 30,000 10,000 3-8 ms SSD
DynamoDB N/A N/A 5-10 ms Provisioned capacity
Multi-Node Cluster Performance
Configuration: 3-node cluster, quorum writes
Database Write Throughput Read Throughput Cross-Region Latency
-------------------------------------------------------------------------------
Cassandra (EC) 90k/s 120k/s 10-20 ms
MongoDB (majority) 15k/s 150k/s 5-15 ms
PostgreSQL (sync) 8k/s 150k/s 80-150 ms
CockroachDB 5k/s 50k/s 100-200 ms
Spanner 3k/s 100k/s 100-300 ms
EC = Eventual Consistency
Latency increases significantly with strong consistency requirements
Consistency Level Costs
Latency Impact by Consistency Level
Consistency Level Same Region Cross-Region Availability
------------------------------------------------------------------
Eventual 1-5 ms 1-5 ms* Very High
Read Your Writes 2-8 ms 80-150 ms High
Monotonic Reads 2-8 ms 80-150 ms High
Causal 5-20 ms 90-180 ms Medium
Sequential 20-50 ms 100-250 ms Medium
Linearizable 20-50 ms 150-300 ms Lower
* Local replica reads may be stale
Cost Multipliers by Consistency
Consistency Level Infrastructure Cost Operational Complexity
-----------------------------------------------------------------
Eventual 1.0× Low
Read Your Writes 1.1× Low
Monotonic Reads 1.15× Medium
Causal 1.5× High
Sequential 2.25× High
Linearizable 3.0× Very High
Costs include storage replication, compute for coordination,
and bandwidth for synchronous replication.
Replication Formulas
Write Amplification Formula
Basic replication:
WA = N
where N = number of replicas
With eventual consistency:
WA = 1 + (N-1) × async_overhead
async_overhead ≈ 0.2-0.5
With quorum (Q replicas for durability):
WA_sync = Q
WA_total = Q + (N-Q) × async_overhead
With LSM-tree compaction:
WA_total = replication_factor × compaction_factor
compaction_factor = 2-10 (depends on workload)
Storage Cost Formula
Total storage cost:
cost = data_size × replication_factor × price_per_GB
For tiered storage:
cost = (hot_data × hot_price) +
(warm_data × warm_price) +
(cold_data × cold_price)
Example:
1TB hot (SSD): 1,000 GB × $0.08 = $80/month
50TB warm (HDD): 50,000 GB × $0.015 = $750/month
200TB cold (S3): 200,000 GB × $0.001 = $200/month
Total: $1,030/month
Capacity Planning Formulas
Compute Capacity
Required compute for database:
vCPU_required = (queries_per_sec × cpu_per_query) / cpu_cores_per_vCPU
Example:
100,000 queries/sec × 0.001 CPU-sec per query / 2 cores per vCPU
= 50 vCPUs required
Add overhead:
- Replication: +20-50%
- Background tasks: +10-20%
- Peak buffer: +50-100%
Total: 50 × 1.5 × 1.5 = 112 vCPUs (round up to 120)
Storage Capacity
Total storage required:
storage = data_size × replication_factor × (1 + growth_rate)^years
Example:
100 GB current × 3 replicas × (1.5)^2 years = 675 GB
Add overhead:
- WAL/redo logs: +10-20%
- Indexes: +20-50%
- Fragmentation: +10-20%
Total: 675 GB × 1.6 = 1,080 GB (provision 1.5 TB for safety)
Bandwidth Capacity
Required bandwidth:
bandwidth = (queries_per_sec × avg_response_size) +
(writes_per_sec × avg_write_size × replication_factor)
Example:
(100,000 reads/s × 1 KB) + (10,000 writes/s × 1 KB × 3 replicas)
= 100 MB/s + 30 MB/s = 130 MB/s
Add overhead for protocol, retries: 130 MB/s × 1.3 = 169 MB/s
Provision for peaks: 169 MB/s × 2 = 338 MB/s (3 Gbps connection)
SLA Calculations
Availability Formula
System availability with N independent components:
A_system = A_component1 × A_component2 × ... × A_componentN
Example (3 components each 99.9% available):
A_system = 0.999 × 0.999 × 0.999 = 0.997 = 99.7%
With redundancy (N components, system works if ≥1 available):
A_system = 1 - (1 - A_component)^N
Example (3 replicas each 99.9% available):
A_system = 1 - (1 - 0.999)^3 = 1 - 0.000001 = 99.9999%
Downtime by SLA Level
SLA Level Downtime/Year Downtime/Month Downtime/Week
--------------------------------------------------------------
90% 36.5 days 3.0 days 16.8 hours
95% 18.25 days 1.5 days 8.4 hours
99% 3.65 days 7.2 hours 1.68 hours
99.9% 8.76 hours 43.2 minutes 10.08 minutes
99.99% 52.56 minutes 4.32 minutes 1.01 minutes
99.999% 5.26 minutes 25.9 seconds 6.05 seconds
Cost-Performance Trade-off Models
Latency Cost Formula
Value of latency improvement:
value = (latency_reduction_ms × queries_per_hour ×
conversion_impact_per_ms × revenue_per_conversion)
Example (e-commerce):
100 ms reduction × 1M queries/hour × 0.01% conversion impact × $50
= $5,000/hour = $120,000/day value
Infrastructure cost for improvement:
cost = additional_replicas × cost_per_replica
ROI = value / cost
Deploy if ROI > threshold (typically 2-5×)
Storage Tier Economics
TCO per GB per month by tier:
hot_SSD = storage_cost + (access_cost × access_frequency)
warm_HDD = storage_cost + (access_cost × access_frequency)
cold_S3 = storage_cost + (access_cost × access_frequency) + retrieval_cost
Example:
Hot (1000 accesses/month): $0.08 + ($0.001 × 1000) = $1.08/GB/month
Warm (10 accesses/month): $0.015 + ($0.001 × 10) = $0.025/GB/month
Cold (1 access/month): $0.001 + ($0.001 × 1) + $0.01 = $0.012/GB/month
Decision: Tier to cold if access_frequency < 10/month
Reference: Benchmarking Methodology
When conducting your own benchmarks:
1. Baseline establishment
Measure idle system performance
Document hardware specs completely
Note software versions and configurations
2. Load generation
Use realistic query patterns (not synthetic uniform load)
Include read/write mix matching production
Apply proper ramp-up and cool-down periods
3. Measurement
Collect P50, P95, P99, P99.9 latencies (not just averages)
Monitor resource utilization (CPU, memory, disk, network)
Record error rates and types
4. Statistical rigor
Run tests multiple times (minimum 3)
Report confidence intervals
Account for warm-up effects
5. Documentation
Record all configuration parameters
Note any anomalies or external factors
Make results reproducible
Further Resources
Benchmarking tools:
YCSB (Yahoo Cloud Serving Benchmark)
sysbench (database benchmarks)
fio (storage I/O benchmarks)
iperf3 (network benchmarks)
Latency measurement:
Prometheus + Grafana (monitoring)
OpenTelemetry (distributed tracing)
Honeycomb (observability)
Performance analysis:
Linux perf
eBPF-based tools (bpftrace, bcc)
Database-specific explain plans
This appendix provides reference values. Always benchmark your specific workload and infrastructure configuration for accurate capacity planning.

