Re: [Hampshire] resolv.conf

Top Page

Reply to this message
Author: Stephen Rowles
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] resolv.conf
Andy Smith wrote:
> I am suggesting that if as in the original poster's case, you have a
> web server that talks to a local DB server, you would not want the web
> server to be connecting to a hostname. You would want it connecting
> to an IP address. Or at worst a hostname in /etc/hosts. You don't
> want it doing DNS lookups.
>
> *snip*
> As a rule I would agree on using host names in the majority of
> cases, but for some situations the performance implications outweigh
> the convenience benefits and the described situation is one of them
> in my opinion.
>
> Cheers,
> Andy
>


Surely with a database app connection times shouldn't be an issue most
of the time, prehaps instead this is indicating a lack of database
connection pooling. Creating a connection is a huge overhead (even if
the DNS lookup is very fast) for lots of reasons beyond the dns lookup.
With connection pooling connections are only dropped occasionally and
the re-connect time isn't a problem as other connections in the pool can
be used during a slow reconnect.

I think that using IP addresses would be just masking a more fundamental
issue here. An occasionally slow re-connect shouldn't be a major issue.