[svlug] to hosts or not to hosts

Bill Ward bill at wards.net
Wed Jan 21 15:27:27 PST 2009


There are two ways that could hurt performance:

- DNS: you have to make a query to the primary or secondary DNS server
which is out on the Internet somewhere.  However, caching should
minimize the impact of this so it shouldn't be a major factor.  You
could improve this by running a caching DNS server inside your LAN
which centralizes the caching of such queries.  This would improve DNS
performance for all host lookups, not just your own.

- Routing: your packets have to go out to the router and undergo NAT
only to be returned back into the LAN.  Accessing the 192.168.1.x
address directly would avoid this, but then you have to maintain the
IP addresses in a local DNS server or maintain /etc/hosts files on all
client machines.

Personally I wouldn't bother with either fix unless it was proving to
be a problem.  The router can handle the traffic and the DNS caching
should minimize the first issue.  You have to also consider your time
it takes to set up the solution, and maintain it as hosts come and go
over time, and decide if that's worth a small performance boost.  On
the other hand, if your router is over burdened, or host name lookups
are slow (e.g. if you have a slow net connection or your DNS servers
do) then it becomes more urgent.

On Wed, Jan 21, 2009 at 3:15 PM, Skip Evans <skip at bigskypenguin.com> wrote:
> We use Virtual Hosting on Apache for dozens of sites, among
> them our mantis.venomouspenguin.com bug tracking and
> dotproject.venomouspenguin.com project management.
>
> My question is does it increase performance to use the entries
> in /et/hosts to keep access on the lan rather than forcing it
> to the outside world to resolve the venomouspenguin.com
> subdomains.
>
> Skip
>
> Jeremiah Wuenschel wrote:
>> This brings up another point that I forgot to mention. An advantage of
>> using DNS names to access your boxes is the ability to use named vhosts
>> in Apache to serve up different web roots on the same box, from port 80.
>> I presume you are currently running things on separate ports? Out of the
>> box, Bonjour (Zeroconf/Avahi) will set up hostname.local for you, but
>> you will need to do some additional configuration on each box to have it
>> announce its services. I have no experience with a setup like this -- I
>> just know that the amount of broadcast traffic will increase, and you
>> may experience difficulties if you decide to make your setup more complex.
>>
>> On Wed, Jan 21, 2009 at 2:09 PM, Bill Ward <bill at wards.net
>> <mailto:bill at wards.net>> wrote:
>>
>>     On Wed, Jan 21, 2009 at 6:57 AM, Skip Evans <skip at bigskypenguin.com
>>     <mailto:skip at bigskypenguin.com>> 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.
>>
>>     If your network is small enough that you are using 192.168.1.xxx then
>>     you probably can just use bonjour to do it.  Most modern Linux distros
>>     advertise themselves using bonjour out of the box such that you can
>>     just use the .local domain to access them.  For example if your
>>     hostname is 'mantis' then just use 'mantis.local' as the hostname.
>>
>>     This of course only works if everyone's under the same router, such as
>>     your typical small network Linksys wifi router.
>>
>>     _______________________________________________
>>     svlug mailing list
>>     svlug at lists.svlug.org <mailto:svlug at lists.svlug.org>
>>     http://lists.svlug.org/lists/listinfo/svlug
>>
>>
>
> --
> ====================================
> Skip Evans
> Big Sky Penguin, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://bigskypenguin.com
> ------------------------------------
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
>




More information about the svlug mailing list