UnixServerAdmin

Server Administration & Management

Increasing Datacenter Resolver Cluster Efficiency

Every server in every datacenter has a default set of resolvers to reach the outside world.  Some have 3 or 4, some even have up to 8!  Whatever the case, you know if they have a lot of servers, their clients have to be hammering it with DNS lookups, right?  Well, should your hosting provider provide multiple servers for DNS recursion, please do them a favor and rotate through them, don’t just use the first one!  Here’s how:

A standard webhosting [unixserveradmin.com] /etc/resolv.conf looks like:

search unixserveradmin.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

All we’re going to do is add 1 line right before nameservers, so it looks like this:

search unixserveradmin.com
options rotate
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

What this will do is rotate which resolvers you have setup in /etc/resolv.conf defined as nameserver. While you’re there, you should also update /etc/host.conf to say:

order hosts,bind
multi on
nospoof on

Order in this case will set the lookup priority to search /etc/hosts first, then do a DNS lookup using /etc/resolv.conf if that fails. Multi controls whether or not /etc/hosts is allowed to have Multiple IP addresses. Nospoof prevents PTR spoofing by double checking that the IP address used by the querying client is actually associated with the hostname the client is trying to present itself as. If all the above are done, then you may not see a difference, even at all.  But your hosting provider will, and we thank you!

August 16, 2011 - Posted by | Tips & Tricks, Unix/Linux | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: