Networking & Protocols • HTTP/HTTPS & Protocol EvolutionMedium⏱️ ~3 min
TLS Handshake Latency: The Critical Path Tax Across Protocol Versions
The TLS handshake represents one of the largest contributors to time to first byte in modern web applications, with costs varying dramatically across protocol versions. Traditional TCP with TLS 1.2 requires approximately 3 round trips before any application data flows: 1 RTT for TCP SYN/SYN-ACK/ACK, then 2 RTT for the TLS handshake including certificate exchange and key derivation. On a mobile network with 80ms RTT, this translates to 240ms of pure handshake overhead before a single HTTP byte is transmitted. TLS 1.3 reduced this to 2 RTT total (1 RTT TCP plus 1 RTT TLS) by condensing the cryptographic negotiation, saving 80ms on that same 80ms RTT connection.
QUIC, the transport protocol underlying HTTP/3, merges transport and cryptographic handshakes into a single 1 RTT exchange, reducing handshake time to 80ms on an 80ms RTT connection. More dramatically, QUIC supports 0 RTT resumption for returning clients, allowing application data to be sent immediately with the first packet, effectively eliminating handshake latency for subsequent connections. Global CDNs like Cloudflare and hyperscalers target session resumption rates above 80% to minimize full handshakes. At scale, achieving 85% resumption means only 15% of connections pay the full handshake cost, keeping median TTFB predictable even during traffic spikes. However, 0 RTT data carries replay risk and must only be used for idempotent requests.
💡 Key Takeaways
•TCP plus TLS 1.2 full handshake costs approximately 3 RTT (240ms at 80ms RTT), TCP plus TLS 1.3 costs 2 RTT (160ms at 80ms RTT), and QUIC costs 1 RTT (80ms at 80ms RTT)
•QUIC 0 RTT resumption eliminates handshake latency entirely for returning clients, critical for mobile apps where connections frequently break and reconnect
•Large scale operators target session resumption rates above 80%; Cloudflare and similar CDNs report actual resumption rates of 82 to 88% in production, reducing median handshake overhead by over 80%
•Each full TLS handshake consumes measurable CPU; at millions of requests per second, reducing handshake rate from 30% to 15% through better resumption can save hundreds of CPU cores
•0 RTT data can be replayed by network attackers, requiring servers to implement replay detection and clients to only send idempotent requests (GET, not POST with side effects) in early data
•Edge TLS termination removes long haul RTTs from the handshake path; terminating at a POP 20ms from the client instead of 100ms from origin saves 160ms to 240ms on the critical path
📌 Examples
Google reported that reducing handshake RTTs through QUIC contributed to approximately 30% reduction in YouTube video rebuffering events in high latency regions like Southeast Asia and parts of South America
A mobile application reconnecting after switching from WiFi to cellular experiences 0ms handshake latency with QUIC 0 RTT resumption versus 240ms+ with TCP plus TLS 1.2, directly improving perceived responsiveness
Pinterest measured TLS 1.3 deployment reducing median time to first byte by 12 to 15% for cold connections and combined with session ticket rotation maintaining 84% resumption rate across their edge fleet