httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45501] New: pending-request lbmethod for mod_proxy_balancer
Date Wed, 30 Jul 2008 10:29:03 GMT
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: bugs@httpd.apache.org
        ReportedBy: joelgluth@yahoo.com.au


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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message