DNS Caching.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DNS Caching.

Michael Closson
Hello,

Does glibc implement a DNS cache as illustrated here:

http://upload.wikimedia.org/wikipedia/commons/0/09/DNS_in_the_real_world.svg



I think the answer is no.  I have used ethereal to monitor network
traffic and have observed that multiple gethostbyname() calls result in
multiple name server queries (one per call), even from authoritative
name servers where the TTL is a reasonable value (1 day).


Never-the-less, since DNS is so cacheable, it seems surprising to me
that is would not be a feature of glibc.


Thanks ahead!

Michael Closson