Simple caching DNS client for Linux (DNS delay on Sympatico is driving me nuts)

As I'm working over at Soni's I'm using her Sympatico DSL connection. It works reasonably fast when you're actually transferring a file, but DNS resolution takes 5 or 10 seconds. When every test makes 3 or 4 lookups you wind up with a very slow test suite.

What I'd really love is a system-level caching DNS client (yes, I know I could set up a whole DNS server to do the caching). Just a little client that, when you ask for a DNS query, caches the last 1000 results. It would return the result immediately from the cache, but do the request anyway (in the background) in case there was a change (to update for the next time).

Sure, there would be cases where rapidly-changing DNS entries wouldn't resolve properly, but I'm guessing 99% of the time you won't care. The number of times you see a DNS failure problem dwarfs the number of times you need a rapidly-changing DNS result... or at least it seems that way to me. I probably access less than 200 servers a day, with the enormous majority of those being the same 2 or 3 servers on which I'm actually working...

Just an annoyance. The problem is that I keep thinking "I could whip up a DNS server in a few minutes in Twisted"... and that way lies madness.


  1. Anonymous

    Anonymous on 12/27/2006 4:07 p.m. #

  2. Seo Sanghyeon

    Seo Sanghyeon on 12/28/2006 12:02 a.m. #

    apt-get install pdns-recursor, and be happy like me. :)<br />
    <br />
    dnscache is also a nice program, but djbwares are PITA to setup on Debian because of license reasons.

  3. Nicola Larosa

    Nicola Larosa on 12/28/2006 6:33 a.m. #

    I use dnsmasq, it works and well and also does DHCP, if configured.

  4. Mike Fletcher

    Mike Fletcher on 12/28/2006 1:27 p.m. #

    Hmm, those all seem to be servers, with moderately involved configuration. I wound up "solving" the problem by just hard-coding the 3 servers I use during the tests in the local /etc/hosts file. That makes the ssh, svn+ssh and xmlrpc calls go reasonably quickly, but will break if we ever move the servers.<br />
    <br />
    Maybe some day I'll have the time to look into a server solution.

Comments are closed.


Pingbacks are closed.