Connection, handshake, header and body phases have different failure modes. A total operation deadline bounds the user’s wait across them.
Before you start
You should understand clients, servers, IP addresses and ports. Follow a request through name resolution, connection establishment and application exchange. Distinguish protocol guarantees from deployment policy, and use observations from the relevant layer rather than guessing from one browser error message.
The practical goal is to reason through this situation: A connected server can stall before sending headers or midway through a body. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.
Step-by-step walkthrough
Step 1: List request phases
Connect, TLS, headers and body each can stall.
Step 2: Apply total usefulness budget
Phase limits must fit the overall operation deadline.
Step 3: Cancel and report honestly
An expired mutation can have an uncertain server outcome.
Worked scenario
A connected server can stall before sending headers or midway through a body.
The connection completes in 20ms, but no headers arrive afterward. A connection-only timeout has already done its job and cannot bound that wait. A total deadline plus appropriate phase limits covers the operation, while cancellation and logical idempotency determine what happens when the client stops waiting.
Common mistake
One connection timeout does not necessarily bound the entire request.
Verify the behavior
Stall each phase independently and verify total duration and resource cleanup.
Interview exercise
Design a robust client deadline.
Answer and reasoning
Allocate phase limits where supported and a total deadline, cancelling owned work and reporting uncertain mutation outcomes accurately.
Continue learning
Compare the scenario with the Networking interview questions and test your understanding with the Networking MCQs. For terminology and implementation details, consult the reference material.