Re: [squid-users] speeding up response

From: Mark Tinka <aknit44@dont-contact.us>
Date: Sat, 8 Jun 2002 09:08:54 +0100 (BST)

getting the exact same instant response u would
ordinarily get without using squid, is somewhat, but
not entirely possible...

u see, the process your browser goes thru, right after
u click on a link or enter a URL into the address bar
and press enter, is the very same process your squid
goes thru.. the process of first finding the domain
name server, then the www address for that domain, and
mapping that address back to an IP.. then connecting
to the remote web server and finding the default or
requested page... doesn't only stop at your browser..
the squid cache also goes thru the very same process
the browser goes thru... which is why it appears to
lag a little....

what i have noticed, however, DNS resolution is the
one of the most latent parts of using squid... to
reduce the effects of this, i have done several tests
with DNS servers, mostly BIND 8.2.4, and transparent
caching, and discovered that it becomes a lot faster
for u and your cache when u are both using the same
DNS server on the same subnet/network to resolve
domain names.... the issue is, when your client
computer sends a request to the DNS server for say,
www.hotmail.com, it will wait for a response from the
DNS server with an IP address.. once that has been
provided, the client machine will then connect to the
squid server, and the squid will then go thru the same
process the browser went thru.... now, if your client
DNS server setting matches that of the squid.. squid
will find the DNS record[s] already cached in the DNS
server [especially if u are running NSCD - name
service cache daemon - ] which will reduce the time it
takes squid to resolve the same name... squid will
immediately connect to the IP address and display the
default or requested page....

by similar DNS setting i mean, in your DNS client u
have:

DNS-1
DNS-2
DNS-3

and in your squid /etc/resolv.conf, u have the same
DNS servers in the same order....

however, situations may arise where the DNS server
order in your DNS client differs from that in squid's
/etc/resolv.conf .. i.e your DNS client says:

DNS-2
DNS-3
DNS-1

but your squid /etc/resolv.conf says:

DNS-1
DNS-2
DNS-3

this means that your windows client will use DNS-2 to
resolve www.hotmail.com, and cache the records in
DNS-2, but your squid will query DNS-1 first, and
won't find the cached record [as the expiration times
for the domains are naturally low].. and will have to
ask DNS-1 for .com, then hotmail.com, then
www.hotmail.com, then the IP address...

this is one of the reasons, i have found, that make
pweb site replies not as instant as when you wouldn't
be using a squid server....

there are several other factors, but this is one of
the most common, and easier to mitigate...

good luck...

AKNIT

--- Kay Joplin <err0r@lunastraat.homeip.net> wrote: >
hi folks,
>
> is there any way to have the pages appear instantly
> on the screen, the way
> they normally would without proxying ?
>
> thnx,
>
> KJ
>
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Received on Sat Jun 08 2002 - 02:08:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:31 MST