Locating a failure along a request path
medium 6 minA client request crosses several separately measurable stages.
Video lesson · Chapter 1 of 4
Lookup, connect or response?
Theory
Read or listen first. About 1 min.
What it is
A client request crosses several separately measurable stages. Name resolution chooses an address, transport connects, TLS authenticates where applicable and HTTP exchanges bytes. A long total duration cannot tell which stage consumed the deadline. Reuse of cached answers and established connections can also make warm and cold measurements differ.
Why it exists
A checkout dependency appears slow only for newly started workers. Compare lookup time, connect time and time to first response byte from the affected workload. Established connections may mask a resolver issue. A cached query on the engineer’s laptop measures a different path. Keep the requested name, resolver and caller population stable while comparing.
If name lookup stays fast, inspect connect and TLS completion before blaming the resolver.
Lookup, connect or response?
Inside this chapter
- Network Connections with ss and netstat
- Socket inspection separates listeners from established connections and shows queue and state information. Filter to the service namespace and interval to avoid mistaking unrelated traffic for a symptom.
- Packet Capture with tcpdump
- For an authorized service, a bounded capture of packet timing and headers can locate a missing response. Restrict scope and avoid recording application payload when metadata answers the question.
- HTTP Debugging with curl
- A client timing breakdown separates lookup, connect, handshake and response. Preserve hostname and caller environment when comparing endpoints because these affect routing and identity validation.
- DNS Debugging with dig and nslookup
- Query the same name and record type through the affected resolver and an authoritative view. Record status, answer and remaining TTL to distinguish absence from stale caching.
- Network Path Analysis with mtr
- Hop sampling can reveal where end-to-end latency changes. Intermediate routers may deprioritize diagnostic replies; an isolated slow hop without downstream degradation is weak evidence.
How it works
Step through the idea, or press Play.
Resolve the name. Record time until the client has an address from its actual resolver.
Understand it
Worked incident
Lookup, connect or response?
| Observation | Name lookup time (ms) | Interpretation |
|---|---|---|
| Baseline | 5 | Cold requests resolve the name within a few milliseconds. |
| Incident | 950 | An unhealthy resolver adds nearly a second before the first connection attempt. |
| After intervention | 7 | Restore resolver reachability and repeat cold and warm requests from the same environment. |
Choose the next investigation
Summary
The whole topic in one minute.
The delay precedes connecting to the server. Application spans begin too late to observe it.
If name lookup stays fast, inspect connect and TLS completion before blaming the resolver.