[ale] /etc/hosts and caching
Lightner, Jeff
JLightner at water.com
Mon Nov 7 08:25:07 EST 2011
Hard coding IPs into applications is generally a bad idea because later you might not remember everything you have to change if your IPs change.
As others have said test things out but if /etc/hosts is actually causing you serious delays I'd suggests your box has other issues going on (e.g. heavily loaded root disk, insufficient CPU or memory) and addressing those underlying issues is going to give you more overall performance in the long run than focusing on host name resolution because those underlying issues likely affect other things as well.
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Damon L. Chesser
Sent: Sunday, November 06, 2011 12:31 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] /etc/hosts and caching
On Sat, 2011-11-05 at 13:28 -0400, Richard Bronosky wrote:
> Geeh, I'm glad someone read my demo! You can talk all day long, or you
> can code a proof. I encourage my developers to do that because at
> least 20% of what they find on the internet doesn't apply because of
> config differences.
>
> I also would encourage the OP to try putting IP addresses into the
> applications to see what that does for performance. Unfortunately the
> concept of "test instead of talk" does not go very far on this list.
Actually, I appreciate the test. We were also talking about just using
IPs in the application vs hostnames. however, I don't yet have access
to those boxes, so I was gathering information. Change control and all
that.
>
> On Nov 5, 2011 10:10 AM, "leam hall" <leamhall at gmail.com> wrote:
> yeah, it took me a sec to figure out why you did that, but it
> makes sense. Your example shows that for that
> purpose /etc/hosts file changes are updated immediately. With
> "immediate" being defined as sub 1 second.
>
> I would assume there are edge cases where nscd causes issues.
> Not sure what they are but with the wide spread usage of Linux
> there are probably some places.
>
> Leam
>
>
> On Fri, Nov 4, 2011 at 6:42 PM, Richard Bronosky
> <Richard at bronosky.com> wrote:
> What is important to note about that example is that
> ping, like most applications that do network lookups,
> will only do the lookup once at the beginning. For
> that reason my example required that I put single ping
> calls in a loop
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
--
Damon
damon at damtek.com
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Athena(r), Created for the Cause(tm)
Making a Difference in the Fight Against Breast Cancer
---------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
More information about the Ale
mailing list