AlgoViz

TCP & networking triage

medium 6 min

A TCP connection has setup, byte transfer and closure phases.

Video lesson · Chapter 1 of 4

Connection setup or request processing?

0:00 / 1:57

Theory

Read or listen first. About 1 min.

What it is

A TCP connection has setup, byte transfer and closure phases. A connect delay precedes application processing, while a response delay can include server queues or slow dependencies. Existing persistent connections bypass setup, so their health does not prove a new client can establish a connection during the same incident.

Why it exists

Only fresh connections fail after a traffic spike. Compare errors and timing for new versus reused connections and inspect listener backlog indicators and packet delivery from the affected path. A delayed handshake can have multiple causes. Confirm which boundary drops or delays attempts before changing retries or application thread counts.

If connect timing is normal but the first byte arrives late, prioritise application queueing and dependency traces.

Connection setup or request processing?

Client → TCP handshake (establish stream). TCP handshake → Application handler (send request)
Client → TCP handshake (establish stream). TCP handshake → Application handler (send request)

How it works

Step through the idea, or press Play.

Step 1 of 3

Baseline. New connections establish in eight milliseconds.

Understand it

Worked incident

Connection setup or request processing?

ObservationConnect time p95 (ms)Interpretation
Baseline8New connections establish in eight milliseconds.
Incident640Fresh clients wait hundreds of milliseconds while reused connections remain fast.
After intervention11Restore listener capacity after confirming queue pressure, then recheck the cold path.
Illustrative measurements from the same workload at three checkpoints.

Choose the next investigation

If connect timing is normal but the first byte arrives late, prioritise application queueing and dependency traces.

Summary

The whole topic in one minute.

The healthy pool bypasses the failing phase and can hide a setup problem in the aggregate.

If connect timing is normal but the first byte arrives late, prioritise application queueing and dependency traces.

Sources