Understanding the TCP three-way handshake in systems interviews
This is a fundamental networking question that tests whether you understand the mechanics of reliable connection setup in TCP/IP. Systems engineers and infrastructure-focused roles at trading firms and tech companies routinely ask it to confirm you grasp the protocol layer beneath the applications you build.
The three-way handshake is the core mechanism by which TCP establishes a bidirectional, reliable channel between client and server. To answer well, you need to identify each distinct phase, explain what each party sends and receives, and describe the state transitions that occur. The question often leads into follow-ups about the purpose of each step, why it's necessary for reliability, and how it relates to concepts like sequence numbers and acknowledgments.
- Connection states (LISTEN, SYN-SENT, ESTABLISHED)
- Sequence number initialization
- ACK (acknowledgment) semantics
- Why three steps are necessary for bidirectional handshake