Re: :-) Squid as a Load Balancer, . . . Yes!

From: TBRIGLIA.US.ORACLE.COM <TBRIGLIA@dont-contact.us>
Date: 16 May 97 13:09:07 -0700

Hi Peter,
 
(squid-users FYI)
 
Your scenario is exactly what i'm trying to achieve. I have a new 6 processor
Sun E3000 that I want to have the majority of the load. The older 4 proc S1000
I want to keep up in case of catastrophic failure of the E3000, or to redirect
load to during peak times.
 
This can be done by having a series of redirector programs that are like "load
templates" that each one is tailored for different conditions. One could be
the default one that redirects all your requests to the primary server.
Another could be for emergency conditions when the primary server is down, and
you want to redirect to the secondary. Then you could have a few others that
would split the load between the two systems using a filter that would send
requests for some of your content to one server, and requests for the rest of
the content to the other server. To really take advantage of this, you might
want to redesign the structure of your "Document Root" on your http server. If
you designed one that split up the most frequently requested objects into a
few different directory structures, you could then easily offload parts of
content requests to the other server.
 
The Load balancing routine would then just evaluate the system performance of
each server, and copy in the redirector program that best suits the conditions
at that time. Then unfortunately you have to send Squid a SIGHUP to reread the
new redirector process into memory.
 
I am sure that my routines could be adapted to your environment, they are all
bourne shell routines that utilize UNIX's built in remote procedure
functionality.
 
If I can find a way for the redirector process to dynamically load in the
prefered load template w/o a SIGHUP, then Squid will make an excellent load
balancer.
 
 
Regards,
 
 
 
-----------------------------------------------------------------------------

Thomas D. Briglia voice:415-506-8212 pager:1-800-6-PAGEME
Internal Systems Engineering Services
Oracle World Wide Customer Support Viva BSD!!!
-----------------------------------------------------------------------------

attached mail follows:


TB>Well I took the advice from some of the replies I received, and built a load
TB>balance mechanism to balance load between two systems using the "redirector"

I would like to have my main squid redirect requests to a second one
when its feed is under load.

I have a main feed and a smaller one usually used for News only. Would
it be possible to adapt your routines or something else so that the main
squid only passed requests to the smaller one when either 1) The main
feed drops or 2) It's link is flooded?

I suspect this is a big ask.

Peter
Received on Fri May 16 1997 - 13:16:32 MDT

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