To avoid an obscure bug, make sure that Apache’s User and Group directives are above this block:
LoadModule backhand_module libexec/mod_backhand.so UnixSocketDir @@ServerRoot@@/backhand # this multicast is actually broadcast because 128 < 224 # so no time to live parameter needed - ',1' restericts to the local networks # MulticastStats 128.220.221.255:4445 MulticastStats 225.220.221.20:4445,1 AcceptStats 128.220.221.0/24 <Location "/backhand/"> SetHandler backhand-handler </Location>
The SetHandler
directive produces the
mod_backhand
status page at the location
specified — this shows the current servers, loads, etc.
The Candidacy functions should appear in a
Directory
or Location
block. A
sample scheme might be:
<Directory cgi-bin> BackhandbyAge 6 BackhandFromSO libexec/byHostname.so byHostname (sun|alpha) Backhand byRandom BackHand byLogWindow Backhand byLoad </Directory>
This would do the following:
Eliminate all servers not heard from for six seconds
Choose servers who names were sub or alpha — to handle heavy CGI requests
Randomize the list of servers
Take a sample of the random list
Sort these servers in ascending order of load
Take the server at the top of the list