Skip to content

Comment on Ask HN: Which wireless router do you use at home?parent

Comments

1. Persistent DNS cache using pdnsd (even after reboot because it is on-disk) with a long minimum global TTL.

What problem does this solve? Is it a bid to improve privacy?

Performance. Most routers also have DNS caches for the same thing. It is often recommended to use OpenDNS servers for privacy, but it is slower than your ISP's DNS or Google's.

This is especially useful when you have an application which doesn't cache DNS requests and issues a new one for every connection. Torrenting gets a big boost for example.

Privacy is just a side effect.

I would be surprised to learn that most routers DNS implementations enforce "a long minimum global TTL". What do you define as long by the way?

EDIT: Also, "Torrenting gets a big boost for example." sounds strange, don't trackers give out IP addresses? Why would BitTorrent be DNS bound?

Most routers just have a DNS cache, not a global TTL, sorry about the misunderstanding.

I have it set up to be 1 day. Most websites have been setting up low TTLs like 1 hour or less because they don't want to take a chance in case of a problem, and DNS is cheap or free these days.

About your statement - 'don't trackers give out IP addresses?', what do you mean?

Often trackers are addressed by their domain (I've never actually seen a tracker without one). So each torrent has its own specific set of trackers. So all those trackers are frequently resolved and contacted for peer exchange.

Well, trackers give out the addresses of peers. If those addresses were given out as hostnames, there'd be a lot of DNS work involved, but they don't (as far as I'm aware).

So then the DNS curb would be looking up the hostnames of the trackers, which I'd guess would be under a dozen or so hosts (I don't know, I'm just guessing) per torrent. That seems unlikely to be a hot-spot to the degree that enforcing a long cache would provide a "big boost" to overall performance.

When you have 1000+ torrents seeding 24/7, even the tracker lookups add up. Usually you aren't downloading. Most of the time, torrents stay idle which will make DNS requests a significant portion of the total traffic. Sure, this might seem overkill, but when the VPN is already slowing down things for you, you do whatever needed to shave those seconds.

OpenDNS look up for Google just now took me 500ms, even without the VPN. I use tunnel mode for DNS on the NAS, which can easily double it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.