
Ask HN: Why DNS resolvers don't use HTTP? - xstartup
Can they simply use REST JSON API? Do you think it will slow down normal browsing?
======
db48x
DNS predates REST, JSON, and HTTP. DNS gets great utility out of the UDP
protocol, which would be lost by using TCP. Parsing the JSON would ruin DNS
server performance (a DNS server can answer hundreds of queries in the time it
takes to parse one JSON message).

~~~
ggm
Truncate forces TCP. DOH or DNS over https is in standards process as is DNS
over TLS and DNS over quic

------
schoen
There is a new protocol from Google to do this:

[https://developers.google.com/speed/public-dns/docs/dns-
over...](https://developers.google.com/speed/public-dns/docs/dns-over-https)

The traditional reason that DNS doesn't use HTTP is (1) published DNS
standards predate published HTTP standards by 9 years, and predate the
mainstream popularity of the web by even more than that (so HTTP didn't even
exist when DNS was created, nor was there any such thing as a firewall that
only permitted HTTP traffic); (2) HTTP requires more roundtrips, which add
more latency, while a UDP-based DNS connection can usually be answered in a
single roundtrip.

However, Google has pointed out that their DNS-over-HTTPS approach can improve
security and privacy. Presumably it will inherently be slightly higher latency
because you need a couple of roundtrips for the TCP and TLS setup even before
you can send a query.

