Re:Why is DNS resolution via UDP faster than TCP on Mac?
by citrin_ru on Thursday January 19, 2023 @07:07AM
(#34439460)
Looks like dig discounts TCP connect time. In drill I see TCP being 2 times slower than UDP (which is what I would expect) but dig shows approximately the same numbers with and without +tcp.
[ Parent
| on HN ]
Re:Why is DNS resolution via UDP faster than TCP on Mac?
by SkyLinx on Thursday January 19, 2023 @07:17AM
(#34439522)
Are you on Mac? What is drill?
Re:Why is DNS resolution via UDP faster than TCP on Mac?
by citrin_ru on Thursday January 19, 2023 @07:39AM
(#34439670)
drill vs dig comparison was not form mac, but I expect them behave similarly on different platforms. drill is a dig-like utility from NLnet Labs, on Mac can be installed as part of ldns library e. g. using 'brew install ldns'
Re:Why is DNS resolution via UDP faster than TCP on Mac?
by SkyLinx on Thursday January 19, 2023 @07:57AM
(#34439805)
With Drill I get the same numbers with or without the -t argument for tcp. So it gives a different result from dig. Why?
Re:Why is DNS resolution via UDP faster than TCP on Mac?
by citrin_ru on Thursday January 19, 2023 @08:26AM
(#34440007)
How these number compare to ping RTT? On FreeBSD I have following numbers - ping: 12ms avg, drill: 13 msec (~RTT), drill -t: 25 msec (2*RTT)
Re:Why is DNS resolution via UDP faster than TCP on Mac?
by benmmurphy on Thursday January 19, 2023 @10:55AM
(#34441658)
if you look at the query in Wireshark from TCP SYN to the DNS response packet was ~11ms for me and dig claimed it was 3ms. kind of surprising that OP found it ALWAYS faster. I had some queries that were faster over UDP. when you are not counting the TCP connection setup I would expect them to be close to the same.