According to Gunther Birznieks:

> I guess part of the question is what is meant by "balanced" with regard to 
> the non-apache back-end servers that was mentioned?

I'd be very happy with either a weighted round-robin or a least-connections
choice.  When the numbers get to the point where it matters, pure
statistics is good enough for me.   But, I love what you can
do with mod_rewrite and would like an easy way to point
the target of a match at an arbitrary set of back end servers.
Mod_jserv has a nice configuration setting for multiple
back ends where you name the set and weight each member.  If
mod_proxy and/or mod_backhand had a similar concept with the
group name being usable as a target for mod_rewrite and 
ProxyPass it would be easy to use.  I think Matt's idea
of creating a Location handler and rewriting to the location
would work as long as the modules are loaded in the right
order, but it would make the configuration somewhat confusing. 

> I am also concerned that the original question brings up the notion of 
> failover. mod_backhand is not a failover solution. Backhand does have some 
> facilities to do some failover (eg ByAge weeding) but it's not failover in 
> the traditional sense. Backhand is for load balance not failover.

Does it do something sensible if one of the targets does not
accept the connection, or does it start sending them all
to that one because it isn't busy?  Mod_jserv claims to
mark that connection dead for a while and moves on to
another backend so you have a small delay, not a failure.
After a configurable timeout it will try the failing one
again.

> While Matt is correct that you could probably write your own load balance 
> function, the main interesting function in mod_backhand is ByLoad which as 
> far as I know is Apache specific and relies on the Apache scoreboard (or a 
> patched version of this)

The problem of writing your own is that it needs to be in
the lightweight server - thus all in C.

> Non apache servers won't have this scoreboard file although perhaps you 
> could program your own server(s) to emulate one if it's not mod_backhand.
> 
> The other requirement that non-apache servers may have for optimal use with 
> mod_backhand is that the load balanced servers may need to report 
> themselves to the main backhand server as one of the important functions is 
> ByAge to weed out downed servers (and servers too heavily loaded to report 
> their latest stats).

If a failed connection would set the status as 'down' and periodic
retries checked again, this would take care of itself.

> Otherwise, if you need to load balance a set of non-apache servers evenly 
> and don't need ByLoad, you could always just use mod_rewrite with the 
> reverse_proxy/load balancing recipe from Ralf's guide. This solution would 
> get you up and running fast. But the main immediate downside (other than no 
> true *load* balancing) is the lack of keep-alive upgrading.

I'll accept randomizing as reasonable balancing as long as I
have fine grained control of the URL's I send to each destination.
The real problem with the rewrite randomizer is the complete
lack of knowlege about dead backend servers.  I want something
that will transparently deal with machines that fail.

> I am also not sure if mod_log_spread has hooks to work with mod_backhand in 
> particular which would make mod_rewrite load balancing (poor man's load 
> balancing) less desirable. I suspect mod_log_spread is not 
> backhand-specific although made by the same group but having not played 
> with this module yet, I couldn't say for sure.

If you can run everything through a single front end apache
you can use that as the 'real' log.  There is some point
where this scheme would not handle the load and you would
need one of the connection oriented balancers instead of
a proxy, but a fairly ordinary pentium should be able to
saturate an ethernet or two if it is just fielding static
files and proxying the rest.   You would also need a
fail-over mechanism for the front end box, but this
could be a simple IP takeover and there are some programs
available for that.

  Les Mikesell
   [EMAIL PROTECTED]

Reply via email to