TLS Handshake Performance: RTT Impact and Termination Strategies
Handshake Latency and RTT Impact
The TLS handshake represents a significant portion of connection establishment latency because it requires multiple round trips before any application data can flow. RTT (Round Trip Time) is the time for a packet to travel from client to server and back. A cold TLS 1.2 connection requires 3 total RTTs: 1 for the TCP three way handshake plus 2 for TLS negotiation. For a user in Asia connecting to a US server with 200 to 250ms RTT, this translates to 600 to 750ms just for connection setup before any content loads.
TLS 1.3 reduces the TLS portion to 1 RTT (2 RTTs total), saving 200 to 250ms on intercontinental connections. QUIC (the transport protocol underlying HTTP/3) integrates transport and cryptography layers to achieve 1 RTT handshakes from cold start and supports 0-RTT resumption for returning clients. HTTP/3 adoption means users on supporting browsers can benefit from QUIC automatically when servers enable it.
Edge Termination Strategy
Terminating TLS as close to users as possible is a fundamental performance optimization. CDNs (Content Delivery Networks, globally distributed servers that cache and serve content) and cloud providers deploy edge locations in major cities worldwide. When TLS terminates at an edge location near the user instead of at a distant origin server, the handshake RTT drops from hundreds of milliseconds to tens of milliseconds. A user in Mumbai connecting to an origin in US East with 250ms RTT saves 150 to 200ms per connection when TLS terminates locally at 20 to 40ms RTT.
Edge termination also offloads cryptographic computation from origin servers. However, this creates a trust boundary: the connection between edge and origin must be secured separately. Options include hop by hop TLS (the edge establishes a new TLS connection to the origin) or maintaining the original encrypted connection through the edge (TLS passthrough). Service mesh architectures often use mTLS (mutual TLS, where both client and server present certificates) for internal traffic.
Session Resumption
Session resumption allows returning clients to skip the expensive full handshake by reusing previously negotiated parameters. Session tickets are encrypted blobs containing session state that the server issues to clients after a successful handshake. On subsequent connections, the client presents the ticket, and if the server can decrypt it, both sides skip key exchange and resume with a abbreviated handshake. Production systems target above 80 percent resumption rates, meaning 4 of 5 returning connections avoid full handshakes.
Full handshakes consume 5 to 10x more CPU than resumed sessions due to expensive asymmetric cryptography operations (ECDHE key generation and signature verification). If resumption rates fall below 50 percent, CPU costs spike dramatically. Low resumption often indicates session ticket keys not synchronized across load balanced servers: when a user returns but hits a different server that cannot decrypt their ticket, resumption fails and triggers a full handshake.