Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Preface:

We have caching resolvers at each of our geographic network locations. These are clustered for resiliency and their locality reduces the latency of internal requests generated by our servers.

This works well. Except that a vast quantity of the requests seen over the wire are lookups for the same records, generated by applications which don't perform any DNS caching of their own.

Questions:

  1. Is there a significant benefit to running lightweight caching daemons on the individual servers in order to reduce repeated requests from hitting the network?

  2. Does anyone have experience of using [u]nscd, lwresd or dnscache to do such a thing? Are there any other packages worth looking at?

  3. Any caveats to beware of? Besides the obvious, caching and negative caching stale results.

share|improve this question
    
Thanks guys. I went with unscd for some frontend machines in the end. Disabled passwd/group caching and lowered the TTLs slightly. Apart from some slightly strange behaviour, as to how it seems to "hook" requests when stopped and restarted whilst Apache is running, it works very well. –  Dan Carley May 18 '10 at 10:59

2 Answers 2

up vote 1 down vote accepted

We use nscd on a few hundred machines, it "just works" in my experience. It massively reduced the load on our DNS servers.

The only thing to watch for is by default it will cache group/user/service lookups as well as host lookups - you may wish to disable this (in our case we wanted to cache these lookups as well).

I remember having problems with nscd many years ago, but the recent versions seem much improved.

share|improve this answer
    
we use nscd and cannot report any significant problems... –  Greeblesnort Jan 26 '10 at 19:05
3  
Do not use lwresd, if it's the thing that is part of BIND 9. It was a bad idea, and I'm sorry I wrote it. –  Michael Graff Jan 26 '10 at 19:32
1  
Michael> Thanks for the laugh :D –  Dan Carley May 18 '10 at 11:00

I've used nscd in a few environments, as others have said it pretty much "just works", but if your caching resolvers at each site are working properly I would say there isn't much of an upside to local caching: Latency should be low, and you're not sending any extra requests to the outside world, just generating some extra internal chatter.

I have been bitten a couple of times by nscd holding on to a stale entry and having "one broken machine" because of it, so my paranoid advice is if your internal DNS chatter isn't really impacting performance don't bother with a local cache (and if performance is being impacted, document the existence of nscd so you remember to flush its cache if you ever make a time-critical change).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.