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

From: TBRIGLIA.US.ORACLE.COM <TBRIGLIA@dont-contact.us>
Date: 15 May 97 15:59:27 -0700

Hi Folks,
 
 
Well I took the advice from some of the replies I received, and built a load
balance mechanism to balance load between two systems using the "redirector".
 
I have written a set of routines that will run on a "front end" system and
what they do is periodically measure the processor load on the two mirrored
"back end" systems. The front end system is running a Squid acclerator to an
httpd server that really has no content, its just there so that Squid will go
into accelerator mode and have a real httpd server to talk to.
 
When the routines detects processor loads above a threshold value on the
default "back end" server, it will compare the running state of each system at
the time and redirect the requests to the system with the least load. The
first step is actually a ping just to check to see each host is alive.
Unfortunately though ping does not really give me much useable data for the
systems are on an FDDI ring which literally has so much bandwidth that ping
times are usually 0 ms.
 
The redirection based on load is accomplished by copying in a differnt version
of the "redirector" program. Unfortunately to make this work you need to issue
 a SIGHUP so that Squid will reload the redirector program. This functionality
will suffice to keep an online mirror available for redundancy, yet I'm not
sure how practical it will be if you had the thing frequently switching back
and forth between servers, each time having to send a SIGHUP.
 
Can any of you experts enlighten me on how detrimental frequent or occaisonal
SIGHUPs will be? On an idle system with a small cache, Squid recovers very
quick from a SIGHUP as far as I can tell. How noticeable to users would it be
if there was a SIGHUP every 2-3 minutes on a busy site???
 
Since one of my servers is probably 5-10 times more powerful than the other,
this will work great for me, for I would like to keep the powerful one doing
most of the work, yet only for emergencies switch over to the older server.
This will be very good also when you want to do maintanance on one of the
systems!
 
I feel if the SIGHUPS are not too detrimental on a busy server, this will be a
great solution for many organizations who want redundancy. The great thing
about architecture like this, it is very scaleable!
 
If anyone has an interest in my load balancing routines let me know and I will
try to make the available anonymously.
 
 
Thanks in advance for anyone who can add their thoughts to the SIGHUP
question!!!!
 
Please "cc" tbriglia@us.oracle.com on any replies. Thanks!
 
 
Regards,
 
 
---------------------------------------------------------------------------
Thomas D. Briglia voice:415-506-8212 pager:1-800-6-PAGEME
Internal Systems Engineering Services
Oracle World Wide Customer Support Viva BSD!!!
-----------------------------------------------------------------------------
Received on Thu May 15 1997 - 16:05:30 MDT

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