3 ms·
The weight of setting up and tearing down an HTTP(S) connection compared to the lightweight DNS query is barely touched.
by gumby 7y ago
The weight of setting up and tearing down an HTTP(S) connection compared to the lightweight DNS query is barely touched.
- tialaramex 7y agoHTTP has keep-alive, you can definitely win for a single UDP DNS query, but web browsers don't do a single DNS query they often do dozens per page displayed and HTTPS can make that faster. The HTTPS connection stays alive but idle for seconds, maybe minutes, and it always has the capabilities that DNS can only get by punting to TCP, which requires a round trip. At the layer above the TLS connection can be brought back quickly from cached credentials using a PSK And at the layer above that the TCP connection can do Fast Open so that there isn't a round-trip there either after the very first session.