Re: [SQU] need help

From: Lionel Bouton <Lionel.Bouton@dont-contact.us>
Date: Thu, 09 Nov 2000 18:21:44 +0100

jason a écrit :
>
> I just installed squid and was wondering if anyone had tried it in the
> following configuration:
>
> I've got 2 win2k web servers that one of our salesguys promised a customer
> could be load balanced w/fail over within the os. This has proven to
> be fairly impossible. What i would like to do is just give th customer
> failover using squid as the primary box and have it redirect the
> traffic to whichever webserver it can reach. I have gotten squid
> running and redirecting to a single box just fine what I am trying to
> figure out is how to get it to discover if one of the servers is down
> then use a cached copy or contact the other web server. The load
> balancing is not an issue right now. If someone has a suggestion on
> that it would be nice to have as well.

1 - simple hack/
Use DNS for that. Assuming your web site is called realwww put 2
"realwww CNAME ..." in the DNS for your web servers.
Squid will detect that a server doesn't answer and fall back to the
other IP, timeout can be 1 second with standard Squid but depending on
the code handling this it may be lowered without too much work with some
hacking.

2 - more complex but more elegant hack/
Use DNS dynamic updates with some perl probes to detect web server
erroneous behaviour.
With low TTL and dynamic updates adding/removing above CNAMEs in the DNS
when the probes mark servers as OK/FAILED Squid won't lose time trying
to communicate with the FAILED server.
With probes you can test pages that reveal incorrect backend behaviour
(database, authentification server) and automatically mail server
failures to the admin too.

Ideally the DNS server would be Bind on the same box configure to handle
a subdomain of your customer's one reserved for this load-balancing
thing.

Lionel Bouton.

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Thu Nov 09 2000 - 10:24:20 MST

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