How do you find the cause of a request that is slow only 1 in 1000 times?
AdvancedScenarioPerformance, MTU, Latency & Tools
Answer
Situation read → Tail latency usually comes from retransmits, DNS timeouts or GC, not average load.
What I'd do →
- Add timing breakdown to logs (connect, TLS, TTFB) and trace IDs
- Check for 1 second or 3 second multiples (TCP SYN retransmit at 1s, DNS timeout at 5s)
- Capture with tcpdump around the slow event
- Use
bpftraceortcpretransfrom bcc to log retransmits live - Correlate with GC pauses and noisy neighbours
Why → Delays in exact multiples of the retransmit or resolver timeouts are a fingerprint.
Interview tip → Say 1s, 3s and 5s latencies point at network timeouts, not CPU.
More on Performance, MTU, Latency & Tools
Latency, bandwidth and throughput: what is the difference and why does it matter?BeginnerWhen do you use ping, traceroute and mtr?BeginnerWhat is MTU and what is the usual value?BeginnerHow do you check what is listening on a port and who is connected?BeginnerHow do you measure where time goes in a slow HTTP request?BeginnerWhat does tcpdump do and what are the first filters you use?Beginner