Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Best caching dns server? (http://www.linux-archive.org/gentoo-user/668441-best-caching-dns-server.html)

Nilesh Govindrajan 05-19-2012 02:15 AM

Best caching dns server?
 
Hi,


Which is the best caching dns server? I'm presently using pdns-recursor, which is quite good, but doesn't have option to set minimum ttl (doesn't make sense, but some sites like twitter have ridiculously low ttl of 30s). Also, it isn't able to save cached entries to file so that it can be restored on next boot. Any option?



I am keeping my box 24x7 on because it serves as dns on my small home wifi, not acceptable to me, because network is almost off at night (only phone) and I have my router as secondary dns.


--

Nilesh Govindrajan

http://nileshgr.com

Adam Carter 05-19-2012 10:59 AM

Best caching dns server?
 
> Which is the best caching dns server? I'm presently using pdns-recursor,
> which is quite good, but doesn't have option to set minimum ttl (doesn't
> make sense, but some sites like twitter have ridiculously low ttl of 30s).

The load balancing technology will be slow to respond if the TTLs are
high, so given that responsive load balancing and timely fail over are
good things, it does make sense. IIRC the F5 default is 20 seconds. Be
careful if you are going to break DNS, there may be consequences
you're not aware of.

> Also, it isn't able to save cached entries to file so that it can be
> restored on next boot. Any option?
>
> I am keeping my box 24x7 on because it serves as dns on my small home wifi,
> not acceptable to me, because network is almost off at night (only phone)
> and I have my router as secondary dns.

Can you re-phrase that? - its hard to understand what the problem is.

Nilesh Govindrajan 05-19-2012 11:13 AM

Best caching dns server?
 
On Sat, May 19, 2012 at 4:29 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>> Which is the best caching dns server? I'm presently using pdns-recursor,
>> which is quite good, but doesn't have option to set minimum ttl (doesn't
>> make sense, but some sites like twitter have ridiculously low ttl of 30s).
>
> The load balancing technology will be slow to respond if the TTLs are
> high, so given that responsive load balancing and timely fail over are
> good things, it does make sense. IIRC the F5 default is 20 seconds. Be
> careful if you are going to break DNS, there may be consequences
> you're not aware of.
>

I know that. Just experimenting things, because if I can cache it
locally, it would be quicker for me.

>> Also, it isn't able to save cached entries to file so that it can be
>> restored on next boot. Any option?
>>
>> I am keeping my box 24x7 on because it serves as dns on my small home wifi,
>> not acceptable to me, because network is almost off at night (only phone)
>> and I have my router as secondary dns.
>
> Can you re-phrase that? - its hard to understand what the problem is.
>

Persistence across multiple boots/reboots.

I found pdnsd which can do that, trying that out now.

--
Nilesh Govindarajan
http://nileshgr.com

Willie Matthews 05-19-2012 11:35 AM

Best caching dns server?
 
On 05/19/12 04:13, Nilesh Govindrajan wrote:
> On Sat, May 19, 2012 at 4:29 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>>> Which is the best caching dns server? I'm presently using pdns-recursor,
>>> which is quite good, but doesn't have option to set minimum ttl (doesn't
>>> make sense, but some sites like twitter have ridiculously low ttl of 30s).
>> The load balancing technology will be slow to respond if the TTLs are
>> high, so given that responsive load balancing and timely fail over are
>> good things, it does make sense. IIRC the F5 default is 20 seconds. Be
>> careful if you are going to break DNS, there may be consequences
>> you're not aware of.
>>
> I know that. Just experimenting things, because if I can cache it
> locally, it would be quicker for me.
>
>>> Also, it isn't able to save cached entries to file so that it can be
>>> restored on next boot. Any option?
>>>
>>> I am keeping my box 24x7 on because it serves as dns on my small home wifi,
>>> not acceptable to me, because network is almost off at night (only phone)
>>> and I have my router as secondary dns.
>> Can you re-phrase that? - its hard to understand what the problem is.
>>
> Persistence across multiple boots/reboots.
>
> I found pdnsd which can do that, trying that out now.
>
You should really try changing you DNS server to some faster ones. I was
having this same problem with my ISP or DSL modem with built in router
taking a long time. I changed my DNS servers to Google DNS Servers
(8.8.4.4 and 8.8.8.8) and haven't had a problem.

My setup is a little different but all in all I would really suggest you
try a DNS server outside of your ISP.

--

Willie Matthews
matthews.willie@gmail.com

Dale 05-19-2012 11:42 AM

Best caching dns server?
 
Willie Matthews wrote:
>
>
> On 05/19/12 04:13, Nilesh Govindrajan wrote:
>> On Sat, May 19, 2012 at 4:29 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>>>> Which is the best caching dns server? I'm presently using pdns-recursor,
>>>> which is quite good, but doesn't have option to set minimum ttl (doesn't
>>>> make sense, but some sites like twitter have ridiculously low ttl of 30s).
>>> The load balancing technology will be slow to respond if the TTLs are
>>> high, so given that responsive load balancing and timely fail over are
>>> good things, it does make sense. IIRC the F5 default is 20 seconds. Be
>>> careful if you are going to break DNS, there may be consequences
>>> you're not aware of.
>>>
>> I know that. Just experimenting things, because if I can cache it
>> locally, it would be quicker for me.
>>
>>>> Also, it isn't able to save cached entries to file so that it can be
>>>> restored on next boot. Any option?
>>>>
>>>> I am keeping my box 24x7 on because it serves as dns on my small home wifi,
>>>> not acceptable to me, because network is almost off at night (only phone)
>>>> and I have my router as secondary dns.
>>> Can you re-phrase that? - its hard to understand what the problem is.
>>>
>> Persistence across multiple boots/reboots.
>>
>> I found pdnsd which can do that, trying that out now.
>>
> You should really try changing you DNS server to some faster ones. I was
> having this same problem with my ISP or DSL modem with built in router
> taking a long time. I changed my DNS servers to Google DNS Servers
> (8.8.4.4 and 8.8.8.8) and haven't had a problem.
>
> My setup is a little different but all in all I would really suggest you
> try a DNS server outside of your ISP.
>


I agree. My ISP is AT&T and I changed my DNS to Google's too. It is
very fast compared to AT&T's servers. I have had AT&T's servers not
respond for several seconds but Google's just seem to work.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"

Pandu Poluan 05-19-2012 12:09 PM

Best caching dns server?
 
On May 19, 2012 6:46 PM, "Dale" <rdalek1967@gmail.com> wrote:

>

> Willie Matthews wrote:

> >


[le snip]


> >

> > You should really try changing you DNS server to some faster ones. I was

> > having this same problem with my ISP or DSL modem with built in router

> > taking a long time. I changed my DNS servers to Google DNS Servers

> > (8.8.4.4 and 8.8.8.8) and haven't had a problem.

> >

> > My setup is a little different but all in all I would really suggest you

> > try a DNS server outside of your ISP.

> >

>

>

> I agree. *My ISP is AT&T and I changed my DNS to Google's too. *It is

> very fast compared to AT&T's servers. *I have had AT&T's servers not

> respond for several seconds but Google's just seem to work.

>


Here's the result of a test comparing the performance of public DNS servers :


http://www.thousandeyes.com/blog/public-dns-resolver-showdown


Despite what the linked article said, in my experience, Level 3 (4.2.2.[1-5]) is at least as fast as Google. I guess it depends on one's ISP. But both of them are mucho faster (and much stabler) than my ISP's DNS servers.



But stay away from OpenDNS like the plague. They are known to perform false resolve, especially if the domain being resolved does not exist.


Best of all would be to create a list of public DNS servers, and feed it into a DNS Benchmarking tool, such as this one from GRC:


http://www.grc.com/dns/benchmark.htm


The above tool is how I determine Level 3 to be on a par with Google. (Sorry, the GRC Tool is Windows-only, but within the article there's an explanation on how the tool works, so it should be emulatable using bash and dig).



Rgds,

Nilesh Govindrajan 05-19-2012 12:53 PM

Best caching dns server?
 
On Sat, May 19, 2012 at 5:05 PM, Willie Matthews
<matthews.willie@gmail.com> wrote:
>
>
> On 05/19/12 04:13, Nilesh Govindrajan wrote:
>> On Sat, May 19, 2012 at 4:29 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>>>> Which is the best caching dns server? I'm presently using pdns-recursor,
>>>> which is quite good, but doesn't have option to set minimum ttl (doesn't
>>>> make sense, but some sites like twitter have ridiculously low ttl of 30s).
>>> The load balancing technology will be slow to respond if the TTLs are
>>> high, so given that responsive load balancing and timely fail over are
>>> good things, it does make sense. IIRC the F5 default is 20 seconds. Be
>>> careful if you are going to break DNS, there may be consequences
>>> you're not aware of.
>>>
>> I know that. Just experimenting things, because if I can cache it
>> locally, it would be quicker for me.
>>
>>>> Also, it isn't able to save cached entries to file so that it can be
>>>> restored on next boot. Any option?
>>>>
>>>> I am keeping my box 24x7 on because it serves as dns on my small home wifi,
>>>> not acceptable to me, because network is almost off at night (only phone)
>>>> and I have my router as secondary dns.
>>> Can you re-phrase that? - its hard to understand what the problem is.
>>>
>> Persistence across multiple boots/reboots.
>>
>> I found pdnsd which can do that, trying that out now.
>>
> You should really try changing you DNS server to some faster ones. I was
> having this same problem with my ISP or DSL modem with built in router
> taking a long time. I changed my DNS servers to Google DNS Servers
> (8.8.4.4 and 8.8.8.8) and haven't had a problem.
>
> My setup is a little different but all in all I would really suggest you
> try a DNS server outside of your ISP.
>
> --
>
> Willie Matthews
> matthews.willie@gmail.com
>
>

I don't use ISP DNS as such, and I don't have their addresses either.
I've been using opendns for ages and added Google as fallback after it
was out for public.

The only advantage of using opendns is phishing protection and other
features like botnet/malware protection, about they not returning
NXDOMAIN on invalid domains is taken care of by pdnsd's reject option
:D

The problem with opendns is the query time is large from my ISP, so
things seem slow.

I'm now using pdnsd, it has support for round robin load balancing
which is the algorithm used for load balancing usually, so websites
shouldn't have a problem.

Also, pdnsd has an option for minimum ttl of records as I wanted and
cache persistence over reboots. It's the thing that fits my needs
perfectly.

--
Nilesh Govindarajan
http://nileshgr.com

Alan McKinnon 05-19-2012 04:36 PM

Best caching dns server?
 
On Sat, 19 May 2012 07:45:56 +0530
Nilesh Govindrajan <contact@nileshgr.com> wrote:

> Hi,
>
> Which is the best caching dns server? I'm presently using
> pdns-recursor, which is quite good, but doesn't have option to set
> minimum ttl (doesn't make sense, but some sites like twitter have
> ridiculously low ttl of 30s). Also, it isn't able to save cached
> entries to file so that it can be restored on next boot. Any option?

You can use almost any cache you want...

... except bind

We use unbound. Does the job, does it well, developer very responsive.

But do not fiddle with TTLs, that breaks stuff in spectacular ways.
Essentially, with the TTL the auth server is saying "We guarantee that
you can treat this RR as valid for X amount of time and suffer no ill
effects if you do"

What you want to do is break that agreement, which is really not s good
idea.

>
> I am keeping my box 24x7 on because it serves as dns on my small home
> wifi, not acceptable to me, because network is almost off at night
> (only phone) and I have my router as secondary dns.

Just use Google's caches or OpenDNS. They do the job so much better
than you ever could. Why reinvent the wheel?



--
Alan McKinnnon
alan.mckinnon@gmail.com

Nilesh Govindrajan 05-20-2012 12:45 AM

Best caching dns server?
 
On Sat, May 19, 2012 at 10:06 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> On Sat, 19 May 2012 07:45:56 +0530
> Nilesh Govindrajan <contact@nileshgr.com> wrote:
>
>> Hi,
>>
>> Which is the best caching dns server? I'm presently using
>> pdns-recursor, which is quite good, but doesn't have option to set
>> minimum ttl (doesn't make sense, but some sites like twitter have
>> ridiculously low ttl of 30s). Also, it isn't able to save cached
>> entries to file so that it can be restored on next boot. Any option?
>
> You can use almost any cache you want...
>
> ... except bind
>
> We use unbound. Does the job, does it well, developer very responsive.
>
> But do not fiddle with TTLs, that breaks stuff in spectacular ways.
> Essentially, with the TTL the auth server is saying "We guarantee that
> you can treat this RR as valid for X amount of time and suffer no ill
> effects if you do"
>
> What you want to do is break that agreement, which is really not s good
> idea.
>
>>
>> I am keeping my box 24x7 on because it serves as dns on my small home
>> wifi, not acceptable to me, because network is almost off at night
>> (only phone) and I have my router as secondary dns.
>
> Just use Google's caches or OpenDNS. They do the job so much better
> than you ever could. Why reinvent the wheel?
>
>

Slow connection. See my previous reply to the list. I'm using pdnsd,
which can persist records and has every damn feature I wanted.

--
Nilesh Govindarajan
http://nileshgr.com

Alan McKinnon 05-20-2012 07:47 PM

Best caching dns server?
 
On Sun, 20 May 2012 06:15:42 +0530
Nilesh Govindrajan <contact@nileshgr.com> wrote:

> On Sat, May 19, 2012 at 10:06 PM, Alan McKinnon
> <alan.mckinnon@gmail.com> wrote:
> > On Sat, 19 May 2012 07:45:56 +0530
> > Nilesh Govindrajan <contact@nileshgr.com> wrote:
> >
> >> Hi,
> >>
> >> Which is the best caching dns server? I'm presently using
> >> pdns-recursor, which is quite good, but doesn't have option to set
> >> minimum ttl (doesn't make sense, but some sites like twitter have
> >> ridiculously low ttl of 30s). Also, it isn't able to save cached
> >> entries to file so that it can be restored on next boot. Any
> >> option?
> >
> > You can use almost any cache you want...
> >
> > ... except bind
> >
> > We use unbound. Does the job, does it well, developer very
> > responsive.
> >
> > But do not fiddle with TTLs, that breaks stuff in spectacular ways.
> > Essentially, with the TTL the auth server is saying "We guarantee
> > that you can treat this RR as valid for X amount of time and suffer
> > no ill effects if you do"
> >
> > What you want to do is break that agreement, which is really not s
> > good idea.
> >
> >>
> >> I am keeping my box 24x7 on because it serves as dns on my small
> >> home wifi, not acceptable to me, because network is almost off at
> >> night (only phone) and I have my router as secondary dns.
> >
> > Just use Google's caches or OpenDNS. They do the job so much better
> > than you ever could. Why reinvent the wheel?
> >
> >
>
> Slow connection. See my previous reply to the list. I'm using pdnsd,
> which can persist records and has every damn feature I wanted.
>

Fair enough, but consider this:

If your connection is slow, the only thing you speeded up is the DNS
lookups. Thereafter, everything else is still as slow as it ever was.
And if you feel the need to speed up DNS lookups then the odds are very
good that "everything else" is too slow i.e. not exactly usable.

We get this a lot from our customers too, and the advise we give them
is to look closely at their traffic throttling. In almost every case
all UDP traffic has had the living crap throttled out of it somewhere
by folk that don't really think things through, severely affecting
dns and ntp as well as AV streaming.

Throttled DNS rapidly gets out of hand, IIRC the last time we did some
measurements it only takes around 5% of dns lookups to go wonky for the
situation to rapidly spiral out of control - when dns fails the cache
will try a TCP lookup and that's like wading through molasses.

Our advice to customers is to first unthrottle dns and ntp completely,
give it the highest possible priority (these are extremely light
protocols and seldom show up on the radar when you do this), and see
how that goes.

It just seems to me that you *might* be trying a very unusual solution
for a problem that is better handled one layer lower down.

--
Alan McKinnnon
alan.mckinnon@gmail.com


All times are GMT. The time now is 10:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.