On Jan 7, 2005, at 4:14 PM, Sander Striker wrote:

From: Jim Jagielski [mailto:[EMAIL PROTECTED]
Sent: Friday, January 07, 2005 8:52 PM
To: dev@httpd.apache.org
Subject: Working on some load balancing methods

I'm currently working on code that extended the lb method within the
2.1/2.2 proxy from what is basically a weighted request count to also
be a weighted traffic count (as measured by bytes transferred) and a
weighted "load" count (as measured by response time). The former is
further along and the methods will be selectable at runtime... This is
definitely a scratch I'm itching,

I'm sure you are not the only one with that itch.

You are welcome to harvest any plumbing you like from mod_backhand. It does exactly what you want only in apache 1.3.x


but before I spend too much (additional) time on it, I'd like some
feedback on whether the concept is one we can all get behind.

FWIW, I like it.

I am also toying with the idea of supporting a CPU load method when
the origin servers are Apache via a custom response header...

"CPU load" is tricky. It has observational bias. System load adjusts two slowly. The number of concurrent connections to each machine actually works pretty well as it suggests that the there are that many Apache "children" (adapt working as needed for Apache 2) working on the box and it lends itself to a current "length of the run queue". All of these methods require total knowledge, otherwise you have contention issues and suffer from inaccuracies due to stale information. There are several nice randomized approaches that work well to smooth our spikes due to stale data. mod_backhand uses a simple stackable selection mechanism called "candidacy functions" that implement all this stuff (optionally as loadable modules) so they "cleverness" of the load balancing decisions can be decided later.


// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
// Ecelerity: fastest MTA on Earth



Reply via email to