Three way handshake
- SYN
Client generate a random number x, send a ‘SYN’ with x to server.
- SYNACK
Server add 1 to x, and generate a random number y then send ‘SYN’ with y and ‘ACK’ with x + 1.
- ACK
Client add 1 to y, and send ‘ACK’ with y + 1 to server.
![Three way handshake from hpbn.co] (/../assets/pic/20191120-hbpn-three_way_handshake.png)
ReadNote
- Random number is to identify request.
- By three way handshake, client and server both send a syn and ack, which means the send and receive function of two sides works properly.
- The three way handshake impacts network performance since each TCP connection will have a full roundtrip of latency. To send a request from New York to London, minimum cost will be 56 milliseconds.