Re: What if Squid goes down?

From: Dancer <>
Date: Wed, 10 Dec 1997 18:54:22 +1000

As for performance issues:

1) The script must be parsed, each time. The browser may compile it. MSIE certainly
seems to try, and our older proxy config script managed to hold it's attention for
approximately 6 minutes while it compiled about 45 lines (counting the 9 lines of
comments). Avoid using any functions if you want MSIE to be able to deal sensibly
with the script. Stick to a plain return "..." for it.
2) You need to do a DNS lookup if you are returning the names of machines. If the
names are CNAME records instead of A records, then you need to do an extra lookup
on each name. Fortunately, you only need to do these once. For better or worse,
browsers cache their DNS results, and (almost?) never look up a name twice in a
single session. This tends to screw load-balancing up, to some degree. Half the
users wind up on one box, and the other half on the other server, and that's it.
The response is cached until the end of the session.
3) The script is only typically renewed at browser startup, except by the user's
manual request. To be honest, though, I've never _tried_ putting an expiry time on
one. I usually include no-cache and no-store headers, since the object is fairly
dynamic (at least the way we use them). I could make them cacheable objects,
assuming Squid made use of the Location: header as the actual URI of the object. I
don't know that squid does this. If it doesn't, I think it should. Netscape shows
some signs of doing a periodic, automatic renewal of it's automatic proxy config,
but I cannot verify this.
4) TEST IT OFFLINE FIRST!! Netscape 4 (at least the version that I'm using) _seems_
to use the old proxy config to try to fetch the new one. If you committed a typo in
the old one, you may have to disable then reenable proxies to load the new script.
This bites, and is probably too lateral for the users to be expected to deal with.
MSIE at least goes direct.

Tom Minchin wrote:

> > >
> > > D
> >
> > Are there any penalties in browsing internet where this kind of
> > redirection is activated? ; I mean, do netscape or msie go any slower?
> >
> >
> There are a couple of pitfalls:
> 1) the webserver that contains the proxy.pac file has to be available (although
> if it's down, you can usually use the previous copy - however, most users just
> cancel that and are left with no proxy settings).
> 2) the fall over works best when connection is refused on the proxy port, if
> the machine dies completely or is isolated from the client, it can take 30 to
> 120 secs for the next proxy to be brought online (it would be nice if you
> could set the timeout limit in the proxy.pac file).
> 3) Squid (or the machine) can also die in such a way that connetions to the
> proxy port are accepted by nothing happens.

Note to evil sorcerers and mad scientists: don't ever, ever summon powerful
demons or rip holes in the fabric of space and time. It's never a good idea.
ICQ UIN: 3225440
Received on Wed Dec 10 1997 - 01:00:55 MST

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