[svlug] to hosts or not to hosts

Florin Andrei florin at andrei.myip.org
Thu Jan 22 12:15:49 PST 2009


James Sparenberg wrote:
> 
>   As far as performance goes.  No there is no reason to prefer DNS 
> over /etc/hosts.  HOWEVER.  when you get past around 2 systems, 
> especially in an environment that plans to grow in size. (Like a 
> business).  Run don't walk towards having your own DNS.

Even when you own the DNS and it's on the same LAN, if you absolutely 
live or die by the response time then /etc/hosts might still be faster 
than DNS in some cases. Yes, it would be nice if the application could 
cache that stuff, so you don't have to. In the real world, that's not 
always available, or maybe not even preferable. "Horses for courses."

/etc/hosts is generally to be avoided, unless it solves some extreme 
scenario you depend on, usually related to the response time. If so, you 
should definitely deploy a config management system (Cfengine, Puppet, 
etc.) and put /etc/hosts under it.
Ideally, even then the config management system should have its stuff 
for the DNS server and for /etc/hosts generated from the same master 
file somehow (so there's a single DNS authority preventing DNS and 
/etc/hosts from drifting out of sync).

-- 
Florin Andrei

http://florin.myip.org/




More information about the svlug mailing list