0
There are two main ways that a TLS handshake can go: Full handshake,
or resume.
There are two benefits to resumption:
- it can save a round trip between the client and server.
- it saves CPU cost of a public key operation.
Round trip
Saving a round trip is important for latency. Some websites don’t use
a CDN, so a roundtrip could take a while. And even those on a CDN can
be tens of milliseconds away. Maybe won’t matter much for a human, but
roundtrips can kill the performance of something that needs to do
sequential connections.
E.g. Australia is far away:
$ ping -c 1 -n www.treasury.gov.au
PING treasury.gov.au (3.104.80.4) 56(84) bytes of data.
64 bytes from 3.104.80.4: icmp_seq=1 ttl=39 time=369 ms
That’s about a third of a second. Certainly noticeable to a
human. Especially since rendering a web page usually requires many
connections to different hosts.
For TCP based web requests (in other words: not QUIC), there’s
usually four roundtrips involved (slightly simplified):
- TCP connection establishment.
- ClientHello & ServerHello.
- Client & Server ChangeCipherSpec.
- HTTP request & response.
So from the UK to Australia, that’s about Continue reading