RELIABILITY, SECURITY & CASE STUDIES · SUBTOPIC
Latency vs. Throughput & Tail Latency (p99)
Understand why optimizing throughput (batching) often increases single-request latency.
IntermediatePart of Trade-offs & Bottlenecks
Subtopics in Trade-offs & Bottlenecks (2)
In plain words
A bus carries way more passengers per hour (throughput) than a sports car, even though the sports car gets one person there faster (latency).
Think of it like…
Sports car (low latency) vs. bullet train / bus (high throughput).
Loading interactive diagram
Loading interactive exercise
Theory & how it works
Taming tail latency with Hedged Requests
If a read typically finishes in 5 ms (p50) but occasionally stalls at 200 ms (p99), sending a duplicate hedged request to another replica only after 10 ms passes cuts tail latency dramatically with <5% extra traffic.
Key points & practical guide
Summary checklist
- Batching increases throughput while adding slight latency
- Measure p95/p99, never just mean latency
- Parallelize fan-out calls and cap with timeouts/hedging
When to use it
- Performance tuning and SLA design
Watch out for
- Quoting "average latency is 15 ms" when 1 in 20 users waits 3 seconds
Quick check
Loading quiz