TCP establishes a connection before delivering a reliable byte stream. Connection setup and application response are separate latency phases.
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 client can connect successfully while the server’s application remains slow. 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: Locate connection setup
A listening endpoint and viable network path precede application exchange.
Step 2: Separate later phases
TLS and HTTP can fail after TCP connects.
Step 3: Use phase evidence
Timeout, refusal and application error indicate different boundaries.
Worked scenario
A client can connect successfully while the server’s application remains slow.
A port accepts TCP but the application takes ten seconds to produce headers. The handshake succeeded while request processing remains slow. Conversely, connection refusal can indicate no listener or active rejection before HTTP exists; investigating response status codes then addresses the wrong phase.
Common mistake
A successful handshake does not validate TLS or HTTP behavior.
Verify the behavior
Record connect, TLS and first-byte timing separately.
Interview exercise
Locate a connection-stage failure.
Answer and reasoning
Inspect routing, reachability and listening endpoints before investigating application status codes.
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.