[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: caching dns lookups



On Wed, Aug 29, 2001, Oded Arbel wrote about "Re: caching dns lookups":
> In your named.conf file, in the options section add the following bit of
> text :
> forwarders {
>     <ip of first dns server>;
>     <ip of second dns server>;
>     <etc.>;
> };
> 
> I personaly don't take the time and just let bind query whatever he likes.

But I think that without such forwarders, if you go to www.yahoo.com for the
first time it queries the root servers (see /var/named/named.ca) for the ".com"
nameservers, then queries one of these name servers for the ".yahoo.com"
name servers, and then queries one of these for the "www.yahoo.com" address.
This will be horribly slow in the first time you access a site, and for a
home dialup user this would be very bad (because he's not sharing a cache
with anyone). Better forward the request to a close name server (in the
Technion, or an ISP you are using) are use it's cache for popular sites.

BTW, even without the forwarders I believe that once you looked up some
domain (e.g., www.yahoo.com), the second time you look it up should be
instantanious. Is that happening? If not, something is wrong, and I doubt
the forwarders will help.

Lastly, Dan, are you sure you really want to use a DNS cache? What was the
reason you decided you wanted one?
In most cases a DNS cache is not useful to "ordinary" modem users. Why?
Because typically (when the modem is not busy), your modem round-trip time 
to your ISP's DNS would about around 130 millisec. Your ISP already carries
a big cache in its nameserver. So all you're adding is 130 millisec to each
DNS query. This isn't too bad for casual web browsing and similar activity
(and note that individual applications do cache the DNS resolutions, so
Mozilla doesn't have to resolve the same domain name over and over).
However, if you find yourself keeping the modem line constantly busy (so
round-trip time can be over 2 seconds because of buffering) and/or using
small applications like wget, nslookup, whois, etc., for the same domain
name, or doing masses of DNS lookups (e.g., converting a huge logfile from
IP addresses to domain names) then maybe DNS caching will indeed be good for
you.


-- 
Nadav Har'El                        |      Thursday, Aug 30 2001, 11 Elul 5761
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Quitters never win. Winners never quit.
http://nadav.harel.org.il           |Idiots never win BUT STILL never quit.

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il