Latency Diagnosis
Diagnosing network vs application latency, p99 vs average, cross-region trade-offs, and queuing theory.
Overview
Latency diagnosis requires distinguishing between different types of latency and their causes. Once you know which kind you are looking at, you can find where it comes from and which layer to fix.
Network vs application latency
Network latency (propagation + transmission delay) is largely physics: ~1ms per 100km in fiber, ~70ms New York to London. Application latency adds queuing delay, processing time, and database round trips on top of network latency.
Key concepts
- p99 latency
- Queuing delay
- RTT (Round Trip Time)
- Connection keep-alive
- Hedged requests
Interview questions
- Your API p99 latency is 2000ms but p50 is 50ms. What are the most likely causes and how do you diagnose?
Sign up free to read the full topic
More Networking topics
Start free on Cariara · Coding problems · System design studio