Need iformation about the internals of a cache server

Barry Margolin barmar at alum.mit.edu
Sat Jun 25 03:16:21 UTC 2005


In article <d9h091$277$1 at sf1.isc.org>,
 "Venkata Chalapathi N" <chalapat at india.hp.com> wrote:

> Hi,
> 
> I would like to know the internals of a cache server. Please refer to any
> document where I can find how exactly the cache server works.

See the section on the Resolver Algorithm in RFC 1034.

> 
> I would like to know the following details:
> 
> 1) How the cache server gets the required data from the root server when the
> client asks the cache server in norecurse and recurse mode?

The caching server only gets data from other servers when the client 
asks in recurse mode.  The caching server does this by sending DNS 
queries.

> 2) Does the root server provides the data by getting the required
> information to the cache server or it will send the information to the   
>    cache server from where the cache server can get the required data?

If the root server has the information in its memory it will send it to 
the caching server immediately.  Otherwise it will send it a delegation 
telling it where to go to get the information.

> 3) If you take a dump in the cache server, how it will print the information
> in the log files?

Nothing is printed in the log files.  When you dump the cache, a 
separate file is created, and the format is similar to a zone file, with 
lots of additional data included as comments.

> 4) How the cache server stores the cached data?

You'd have to read the code, it's a complex tree data structure that 
somewhat mirrors the DNS hierarchy.

> 
> 5) How the cache server resolves the client's queries when
> 	i) cache has no information about the requested query

It looks for NS records of the most specific domain containing the name 
in the query, and queries those servers; the root servers are the final 
default if there are no more specific matching domains.  If they return 
delegations to more specific servers, it tries again with those servers, 
and keeps repeating this until it gets the answer, is told that the name 
doesn't exist, or gets an error.

> 	ii) cache has the information about the requested query

It returns it to the client.

> 	iii) cache has the staled information about the requested query

Stale information is discarded and then it goes through the above 
procedure.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***



More information about the bind-users mailing list