~1 min read 0 comments

Three way handshake

  1. SYN

Client generate a random number x, send a ‘SYN’ with x to server.

  1. SYNACK

Server add 1 to x, and generate a random number y then send ‘SYN’ with y and ‘ACK’ with x + 1.

  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

  1. Random number is to identify request.
  2. 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.
  3. 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.