4 ms·
I would assume being able to reuse the connection for multiple requests. Setting up the TLS connection is quite a bit more expensive than raw TCP, and especial
by LukeShu 10y ago
I would assume being able to reuse the connection for multiple requests. Setting up the TLS connection is quite a bit more expensive than raw TCP, and especially UDP (most DNS happens over UDP). For longer connections, the additional overhead is minor, but for the extremely short DNS messages, I would imagine that a TLS connection per DNS request would be some pretty substantial overhead.
Edit: The page mentions that this allows web applications to make their own DNS requests, possibly looking up things other than A/AAAA records that the browser normally requests.
- eggnet 10y agohttp and rest are not the only ways to reuse a socket. You could just write the packet to the TLS stream, raw, and keep the socket open.
- LukeShu 10y agoDefinitely. But then you need to define an envelope to mark where an individual message begins and ends (with UDP DNS, it's a single datagram; with TCP DNS, it's the entirety of the transmission). There are infinite ways to do this, and countless many already specified in various standards (many of which are already implemented in browsers, which is surely the the primary application Google had in mind). HTTP provides one such envelope.
- pprx 10y ago> with TCP DNS, it's the entirety of the transmission DNS Messages have a two-byte length prefix when transmitted over TCP. Multiple envelopes can and often are sent over a single circuit.
- joshAg 10y agothat's what ssl tickets are there for. heck you can even do that over udp with dtls, if you don't want to deal with setting up and tearing down tcp connections.