[ale] /etc/hosts and caching

Tim Watts tim at cliftonfarm.org
Fri Nov 4 11:08:04 EDT 2011


I can't say whether there's any caching on the kernel level but I do
know that some apps and libraries can do some caching.  This may explain
the contradictory experiences people have had.  Java has properties you
can set for this but I don't recall whether this overrides DNS or is
used as a default in lieu of other advice (i.e. /etc/hosts).


On Fri, 2011-11-04 at 07:40 -0400, Chesser.Damon wrote:
> This dovetails into building a DNS caching server I asked earlier this
> week.  The issue is we are seeing latency in our application and a
> possible (but only possible, not proven) issue might be host lookups.
> I figured that an entry into /etc/hosts would be faster than a WAN DNS
> lookup especially since the IP is static.  Someone was concerned with
> disk reads and that becoming a bottleneck.  Someone else pointed out
> that /etc/hosts file was cached.  
> 
>  
> 
> This started a google search by me to find out if that was true or
> not.  Totally inconclusive.  Some have reported issues with not being
> able to get the Linux box to re-read the hosts file after a change was
> committed short of a reboot or init restart.  Others have said just
> make the change and it shows up.  I have not found any documentation
> saying whether it was cached or not.  Any smart guys know the answer
> or can provide any documentation on that?  It’s kind of funny, you
> think you KNOW something until someone says “Prove it”.
> 
>  
> 
> Damon at damtek.com
> 
>  
> 
> 
>  
>  
>  
> LEGAL DISCLAIMER
> The information transmitted is intended solely for the individual or
> entity to which it is addressed and may contain confidential and/or
> privileged material. Any review, retransmission, dissemination or
> other use of or taking action in reliance upon this information by
> persons or entities other than the intended recipient is prohibited.
> If you have received this email in error please contact the sender and
> delete the material from any computer.
>  
> SunTrust is a federally registered service mark of SunTrust Banks,
> Inc. Live Solid. Bank Solid. is a service mark of SunTrust Banks, Inc.
> [ST:XCL]
> _______________________________________________
> 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





More information about the Ale mailing list