May 17, 2017

[HDGEM] Establish a http connection

When someone visits a website, a connection is established between browser and the website's server. To establish a connection, TCP uses a three-way handshake.
1. SYN: CloudFlare sends three SYN packets to the origin server.
2. SYN+ACK: In response, the origin server replies with a SYN+ACK.
3. ACK: Finally, CloudFlare sends an ACK back to the origin server.

At this point, both browser and the server have received an acknowledgement of the connection and communication is established. If the origin server does not send a SYN+ACK back to browser within 15 seconds, a 522 error will occur and the connection is closed