[Openstack-operators] Slow DNS resolver causing problems for OSLO
Jeff Silverman
jeff at sweetlabs.com
Tue Aug 5 01:34:56 UTC 2014
George,
The way DNS works is that the resolver queries the first nameserver listed
in /etc/resolv.conf. That name server has 15 seconds to respond. Why so
long? Because the name server may have to do a recursive search, and that
used to take a lot of time. If the name server doesn't respond in 15
seconds, then the resolver tries the second name server. It also has 15
seconds to resolve the name. If it doesn't respond, then the resolver
tries the third name server. The bottom line is that the resolver may
take up to 45 seconds to resolve the name. That's a long time.
What I have seen done is to load balance name servers. The load balancer
does a health check on the nameservers periodically, say, once a minute.
If a name server goes down, then the load balancer takes that name server
out of rotation. That way, a query will probably succeed within 15 seconds.
If that's not fast enough, then you can use a caching name server on each
node. The caching name server is not authoritative, so it is easy to set
up. Since the overwhelming majority of name queries will be for machines
in your cluster, the caching name server will quite likely have the answer
in RAM already, so the response will be very fast (milliseconds or tens of
milliseconds).
Jeff
--
*Jeff Silverman*
Systems Engineer
(253) 459-2318 (c)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20140804/4b15617f/attachment.html>
More information about the OpenStack-operators
mailing list