5 ms·
>Or just run a resolver yourself. I did this for a while, but ~300ms hangs on every DNS resolution sure do get old fast.
by ripdog 1y ago
>Or just run a resolver yourself.
I did this for a while, but ~300ms hangs on every DNS resolution sure do get old fast.
- xpe 1y agoOuch. What resolver? What hardware? With something like a N100- or N150-based single board computer (perhaps around $200) running any number of open source DNS resolvers, I would expect you can average around 30 ms for cold lookups and <1 ms for cache hits.
- ripdog 1y agoNot a hardware issue, but a physics problem. I live in NZ. I guess the root servers are all in the US, so that's 130ms per trip minimum.
- johnklos 1y agoThey are not all in the US.
- ripdog 1y agoWell that's the experience I had. Obviously caching was enabled (unbound), but most DNS keepalive times are so short as to be fairly useless for a single user. Even if a root server wasn't in the US, it will still be pretty slow for me. Europe is far worse. Most of Asia has bad paths to me, except for Japan and Singapore which are marginally better than the US. Maybe Aus has one...?
- janfoeh 1y agoAccording to [0], there is at least one in Auckland. No idea about the veracity of that site, though. [0] https://dnswatch.com/dns-docs/root-server-locations https://dnswatch.com/dns-docs/root-server-locations
- encom 1y ago>DNS keepalive times are so short as to be fairly useless Incompetent admins. dnsmasq at least has an option to override it (--min-cache-ttl=<time>)
- astrange 1y agoCloudflare actually runs one of the root servers (https://blog.cloudflare.com/f-root/ https://blog.cloudflare.com/f-root/).
- passivegains 1y agoI was going to reply about how New Zealand is as far from almost everywhere else as the US, but I found out something way more interesting: Other than servers in Australia and New Zealand itself, the closest ones actually are in the US, just 3,000km north in American Samoa. Basically right next door. (I need to go back to work before my boss walks by and sees me screwing around on Google Maps, but I'm pretty sure the next closest are in French Polynesia.)
- bauruine 1y agoThe root servers aren't the problem. They are heavily anycasted and i'm sure there are many in .nz. If that was the issue you could simply serve the root zone yourself, at least some of them allow axfr. [0] This info is also easy cacheable, they have big TTLs and you only have to do it once for each tld. The authoritative name server of the domain you want to access on the other hand are often just in the US or Europe and are the main issue. Edit: How to serve the root zone locally with unbound. https://old.reddit.com/r/pihole/comments/s43o8j/where_does_unbound_create_or_try_to_create_its/ https://old.reddit.com/r/pihole/comments/s43o8j/where_does_u... [0] dig axfr . @k.root-servers.net
- ripdog 1y agoThank you for the correction, I did get that wrong. To be clear, there was no easy solution to get reliable, low latency DNS responses from my own resolver without breaking keepalive by forcibly caching entries longer?
- bauruine 1y agoNot that I know of except from having a big cache and many users that keeps it warm. As I said you could run a local root zone but that only saves you the one time lookup every week+ of the tld name servers and the root servers are generally very close to you. There is a map of all root servers. There are 12 in .nz alone. A few cc tlds are providing their zone via axfr [1] so you could add that to your resolver to save some roundtrips but I don't think having .ch or .se locally will make a big difference and they are 1.2GB each and you would need to download them daily. [0]: https://root-servers.org/ https://root-servers.org/ [1]: https://github.com/jschauma/tld-zoneinfo https://github.com/jschauma/tld-zoneinfo