Should DNS be on same server as webserver?

Bill Moran wmoran at potentialtech.com
Mon Jul 13 16:50:39 UTC 2009


In response to John Almberg <jalmberg at identry.com>:

> The other day, a FreeBSD 'expert' told me that it is important to  
> have the DNS server for a domain on the same server as the domain's  
> web server. Supposedly, this saves doing tons of DNS look ups over  
> the network. Instead, they are done locally.
> 
> This makes sense to me, but I wonder if the performance difference is  
> really that significant?

Don't know exactly how he phrased that statement, but it's truthfulness
is highly dependent on the situation.

It's possible (even recommended) to configure Apache not to do DNS lookups,
which makes the statement rather moot.

However, as a general rule, it's a good idea to have a fast DNS cache
available to systems that will be doing a lot of lookups.  In a typical
configuration, a web server will do a lot of lookups.  It doesn't _have_
to be on the same server, in fact, if you have multiple busy web servers,
it's probably a better idea to dedicate a machine to doing DNS caching.

Of course, if your hosting provider already provides a set of fast caches
for you to use, it's not really necessary for you to set up your own.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/


More information about the freebsd-questions mailing list