https://issues.apache.org/bugzilla/show_bug.cgi?id=45501
Summary: pending-request lbmethod for mod_proxy_balancer
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: All
URL: http://labs.reevoo.com/2008/7/30/fixing-uneven-load-
balancing-between-apache-and-mongrel-for-ruby-on-rails-
applications
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: mod_proxy_balancer
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=22329)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22329)
patch for adding "bybusy" lbmethod to mod_proxy_balancer, plus docs
A new lbmethod (bybusy) that counts pending requests per worker, to ensure that
workers (like Mongrel) that queue requests are evenly loaded at all times.
We've been using this in our live environment (see somewhat wordy link above)
and it's helped smooth out performance a lot... I've gone from getting anything
up to a dozen (generally spurious) Nagios alerts a night to none, so I thought
it worth contributing back to Apache in the hope that others might find it
useful.
[Excuse blog post excerpt]
For each proxy worker thread in the web server, increment a "busy" counter when
assigning a request to that worker. In the post-request hook, decrement the
counter again. When choosing a worker, simply pick the worker with the lowest
"busy" value.
Use the "byrequest" method as a tie-breaker between workers with identical
"busy" values (most frequently, when they are idle). So we get the
moment-to-moment balancing we wanted to start with, but also the historical
balancing that we had originally and which leads to nicely-balanced log files.
[end excerpt]
The "busy" counter is already present in the worker's scoreboard (and has been
since at least 2.2.3, which is as far back as I checked), but is unused until
now.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]