Mailing List Archive

FW: [mod_backhand-users] Another New Candidacy Function: byC hooseMeOverLocal
Quickie, but wasn't the point of byCost to prevent overloading a
single machine?

-----Original Message-----
From: Theo E. Schlossnagle [mailto:theos@cnds.jhu.edu]
Sent: Tuesday, August 01, 2000 10:27 AM
To: Stephen Nickels
Cc: backhand-users@lists.backhand.org
Subject: Re: FW: [mod_backhand-users] Another New Candidacy Function:
byChooseMeOverLocal


Well, that will effectively limit the requests from going to the proxy
servers. But, if you receive 1000 requests in one second, all of the
proxies *see* the same picture and will choose the *same* app server.
This can be horrific. Becuase the load on a UNIX box is the 5 second
average, you won't notice that you have beaten the box to death until it
is too late. Then you will proceed to beat another box to death.
(Round robind has its advantages, no?)

So, if you look at a randomized window (Log base 2 has some nice
theoretical properties -- but any decently small window will do), not
all of the machines will contend for the same resource. You are assured
however that you will not go to the n-1 most heavily loaded machines
(where n is the window size), because even in the case where your random
window covers exactly the most loaded server, you will choose the most
lightly loaded of them.

Basically, a randomized log window will prevent you from beating a
single machine to death. I think this is discussed in a paper by
Mitzenmacher and Dahlin.

So
<Directory>
Backhand byAge 3
BackhandFromSO libexec/byHostname.so byHostname app
Backhand byRandom
Backhand byLogWindow
Backhand byLoad -1000
</Directory>

would probably do the trick, if you were using proxies in the front
end... Note that the byLoad has changed in the current CVS (stable)
version and will be so in the next release to more accurately reflect my
miscoded intentions and the FAQ :)

Stephen Nickels wrote:
>
> That looks pretty cool. But why not use byHostname?
> Say you've got the following server setup:
>
> Proxies:
> proxy1
> proxy2
> proxy3
>
> mod_perl boxes:
> app1
> app2
> app3
>
> You could use the following setup on your proxies:
>
> <Directory /path/to/docroot>
> Backhand byAge 3
> BackhandFromSO libexec/byHostname.so byHostname app
> Backhand byRandom
> Backhand byLoad -1000
> </Directory
>
> This will make all requests go off to the mod_perl application boxes and
> should take the proxy boxes out of the loop for filling requests.

--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7

_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users