clean cache

Barry Margolin barmar at bbnplanet.com
Mon Apr 3 19:00:08 UTC 2000


In article <4.2.0.58.20000403113647.00a3eb40 at mail.fireclick.com>,
Robert Gahl  <bgahl at bawcsa.org> wrote:
>At 06:23 PM 4/3/00 +0000, Barry Margolin wrote:
>
>>The problem may be that the data is cached at the other computers'
>>nameservers.  You can't clean them out.  You can use the TTL to tell them
>>how long they can cache things.
>
>This brings up a question I've been trying to answer and can't seem to get 
>the answer (from an implementation perspective).
>
>I pretty much have a handle on how data originally ends up in an ISP's 
>cache. But, what I don't seem to be able to understand is how the TTL value 
>ties into updates. That is, once a set of data is in an ISP's cache, does 
>it automatically update at the TTL time (or TTL time w/i reason), or does 
>it only update based upon an ISP user request. By that I mean, if a user 
>asks for a DNS lookup of some form, does this cause DNS to check the TTL 
>value, and if expired, go get a new copy?

Prior to BIND 4.9, it only checked the TTL when someone queried the record.
If it's expired, it deletes it and then performs a new lookup.

Starting in BIND 4.9, named scans its cache periodically, looking for
records whose TTLs have expired, and deletes them.  It doesn't re-query the
originating nameserver, though; it will only do this if someone tries to
look the name up again.  This is in addition to checking the TTL of a
record in the cache when someone queries it (in case the TTL expired since
the last scan).  The purpose of this scan is to clean out unnecessary
entries from the cache -- old versions of BIND would continuously grow
their heap because they never forgot anything.

>What I'm asking, I think, is what is the mechanism by which the DNS cache 
>at an ISP updates itself? Is it automatic or is it based upon a user 
>request event?

Deleting is automatic, due to the scans.  Updating is due to user requests.

-- 
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



More information about the bind-users mailing list