TCP three-way handshake
The three-message exchange, SYN, SYN-ACK and ACK, that a client and server use to open a TCP connection before sending data.
In more detail
The client says it wants to connect, the server agrees, and the client confirms. The exchange takes one full trip to the server and back, so on a distant or slow network it adds noticeable delay before the first byte. Keeping connections open and using preconnect hide this cost.
Related terms
- TCP — The internet protocol that delivers data between programs reliably and in order, used by the web and most databases.
- TLS — The encryption that protects data travelling over a network, the S in HTTPS.
- latency — The time between asking for something and getting the answer back.
- preconnect — A resource hint, <link rel="preconnect">, that makes the browser do the DNS lookup, TCP handshake and TLS negotiation with another server before any request is sent.
Taught in
- How Browsers Work: Navigation, DNS, TCP, TLS And Request Timing — Frontend Architecture & Web Platform
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform