1

Last night we were having some serious server events. At first it appeared that our issue was with google (8.8.8.8). We would run ping and at some point we would have some packet loss. At about the same time our systems would pop a DNS getaddr() exception.

Separately; this is strange to me because I have had to flush my local DNS cache from time to time when my DNS records change at my provider...

Shouldn't my applications and servers, which hit the same 5 remote service providers, have cached the DNS? Why would I get DNS errors instead of network errors?

Zoredache
  • 128,755
  • 40
  • 271
  • 413
Richard
  • 161
  • 1
  • 2
  • 8

2 Answers2

1

If you are losing packets when you ping the DNS server, it seems perfectly normal to also have periodic failures when asking the DNS server to resolve names for you.

It's hard to diagnose the apparent lack of caching without knowing what the TTL is on the records in question - it could be that the remote host(s) have their TTL set to very short lifetimes because they anticipate swapping machines or they're trying to do DNS-based failover.

I would not expect your local application to cache DNS information, at least not for any serious length of time. IMHO, that would be a bug, not a feature.

If your local caching DNS server doesn't seem to be caching, I would investigate the TTL on the records you want cached, and make sure that the machines reporting errors are set up to use only your caching server for name resolution.

gbroiles
  • 1,344
  • 8
  • 8
1

Your servers will only cache dns records if you are running nscd.

  • ...or another local nameserver, such as Bind. But you're right. Linux servers only cache DNS queries when you install a DNS cache. – Martijn Heemels Sep 27 '10 at 21:07