this module is written for apache 1.3.x and may be obsolete. more, there may be better solutions for apache load balancing than mod_backhand is. and last, spread sucks. spread and mod_backhand are more like educational software. in real life you should use something else.
if you ever needed to implement http load balancing between multiple apache http services, you probably wanted to use mod_backhand and spread. me too, but i did not really like the way bySession load balancing was done because i needed to take care of session cookies inside my application. If you tell mod_backhand to do the balancing using a session identifier (this is how i wanted to doit and you will probably want as well, unless your session data is shared via nfs or mysql or some client/server solution ... ) he expects to find a cookie in the user request containing a hex encoded ip where the user's request will be routed. by default he's looking for PHPSESSID ... and thats it so you have to modify your php scripts in order to encode the ip of the server who started to write data to the visitor for the first time.
I wanted this to happen no matter what scripting engine i am using, so there goes mod_bbsession.
i wrote mod_bbsession module for this, so session management can be done transparently by apache when mod_backhand is used. this module is written for apache 1.3.x
as for any other apache module, use apxs -c and apxs -i to build and install mod_bbsession.
You have to install it on all the cluster www members. It is easy to setup. You just have to make sure mod_bbsession is loaded at apache startup by httpd. After that, you can configure backhand like this:
<IfModule mod_backhand>
<Location />
Backhand addSelf
Backhand byAge 30
Backhand byBusyChildren 4
Backhand bySession "FATBITPIPE2="
</Location>
</IfModule>
You can setup a testing location like this:
<ifModule mod_bbsession>
<Location /bbsesion>
SetHandler bbsession-handler
</Location>
if you will access http://www.yourdomain.com/bbsession you will get for the first time something like this:
10.0.0.1 <-> 10.100.100.12
backhand should forward to server NO_SAVEASS_COOKIE_FOUND
thats ok. this is the first request and it was proxied to server 10.100.100.12 (10.100.100.12 is the server, 10.0.0.1
is the ip from where the request was originated, your ip)
Second time, you will get
10.0.0.1 <-> 10.100.100.12
backhand should forward to server 10.100.100.12
Thats it. You should have now a working solution for ur bySession load balancer.