[svlug] to hosts or not to hosts

James Sparenberg james at linuxrebel.org
Wed Jan 21 18:28:14 PST 2009


On Wednesday 21 January 2009 06:57:02 Skip Evans wrote:
> Hey all,
> 
> Here on our LAN we have a couple of development servers where 
> all our client code sits as happy as clams. For code editing 
> we just mount them as NFS points and edit away, but web based 
> systems we use for project management (dotProject) and issues 
> tracking (Mantis), we of course connect through http.
> 
> My question is this:
> 
> Is it more efficient or desirable to put an entry in
> 
> /etc/hosts
> 
> like say
> 
> 192.168.1.100	dotproject.venomouspenguin.com
> 192.168.1.100	mantis.venomouspenguin.com
> 
> for these applications?
> 
> I have tried it both ways and see no discernible performance 
> increase.
> 
> I would guess one advantage would be these apps would still be 
> accessible if the connection to the outside went down?
> 
> Does it resolve the local apps to a 192.168 internal address 
> even without the entries (I would guess not), or does it 
> always go outside first?
> 
> Does it also depend on the entries in resolv.conf which way ti 
> goes (inside or out)?

Skip,

  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.

   The reason.  Cost.  Plain and simple.  The cost of having a new admin 
learn the ropes is lower (Unless you are planing on being the only 
admin this company will ever have) Additionally if you need to 
re-allocate IP addresses.  (and you will) then DNS allows for a single 
change in just one place.  You make the change. Poof everyone picks it 
up.  With hosts on the other hand it's a  login, change, test, change 
again, logout, repeat scenario and, if one of the boxes is gone, or if 
you later go to DNS and forget, it can create a trouble shooting 
nightmare.  I know I spent the first year with my current company 
fixing problems like this all over the place.  

Do it in DNS .... period you will be so glad you did in the long run.  

James




More information about the svlug mailing list