Re: disable dnsserver - what is the cost?

From: Jens-S. Voeckler <[email protected]>
Date: Wed, 18 Nov 1998 09:57:20 +0100

On Tue, 17 Nov 1998 timur@tabi.org wrote:

]>So if you request a URL with these hostnames, Squid is
]>stuck until the DNS lookup returns or times out. If you change
]>your mind and abort the request and make another request, you
]>will get nothing from Squid until the previous lookup times out. Could take
]>up to two minutes.
]
]But doesn't that mean that squid NEEDS to do a DNS lookup,
]no matter what?

No, squid *does* need to do a DNS lookup, no matter what, unless you
decide to use all numerical hostnames in all your URLs - which none of
your users will do. As soon as there is a symbolic hostname in the URL,
bang starts the DNS lookup. The returned value is used to contact the
origin site (if going directly), as IPv4 adresses are just 32 bit
big-endian numbers. And that is what DNS forward lookups return.
Furthermore, even for contacting your parents you need DNS lookups at
least during startup...

I'd say starting a few server processes does not hurt. And if you have a
busy squid, configuring and starting a few more is even better to cope
with the load. At peak times my squids need up to 1.5 DNS lookups per
second. Mine average at 25 requests per minute during weekdays.

]If so, then if it doesn't use dnsserver.exe, what does it use?

I haven't looked into the code, but I would presume that squid calls
gethostbyname() itself in that undesirable situation - and blocks until
return.

Le deagh dh�rachd,
Dipl.-Ing. Jens-S. V�ckler (voeckler@rvs.uni-hannover.de)
Institute for Computer Networks and Distributed Systems
University of Hanover, Germany; +49 511 762 4726
Received on Wed Nov 18 1998 - 02:12:55 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:43:09 MST