[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load balancing and load determination

On 10/30/2018 01:53 PM, Jim Jagielski wrote:
> As some of you know, one of my passions and area of focus is
> on the use of Apache httpd as a reverse proxy and, as such, load
> balancing, failover, etc are of vital interest to me.
> One topic which I have mulling over, off and on, has been the
> idea of some sort of universal load number, that could be used
> and agreed upon by web servers. Right now, the reverse proxy
> "guesses" the load on the backend servers which is OK, and
> works well enough, but it would be great if it actually "knew"
> the current loads on those servers. I already have code that
> shares basic architectural info, such as number of CPUs, available
> memory, loadavg, etc which can help, of course, but again, all
> this info can be used to *infer* the current status of those backend
> servers; it doesn't really provide what the current load actually
> *is*.
> So I was thinking maybe some sort of small, simple and "fast"
> benchmark which could be run by the backends as part of their
> "status" update to the front-end reverse proxy server... something
> that shows general capability at that point in time, like Hanoi or
> something similar. Or maybe some hash function. Some simple code
> that could be used to create that "universal" load number.
> Thoughts? Ideas? Comments? Suggestions? :)


It seems that is exactly what does.

- it has a Tomcat listener / JBoss AS (Wildfly) module that reports
  a worker-side calculated load number

- httpd side is completely oblivious as to how the number was calculated,
  which worker used which load metric to calculate it etc, it just receives a number

- httpd side dynamically configures mod_proxy balancers according to joining
  and leaving worker nodes

- httpd side uses the load number to balance requests among healthy workers

An obvious down side is that the worker must implement this mod_cluster
logic. Implementations exist for JBoss AS/Wildfly/Tomcat, but we don't have
one for Jetty for example. On the bright side, the protocol itself is dead simple.

Disclosure: I am involved in the project.


Michal Karm Babacek

Sent from my Hosaka Ono-Sendai Cyberspace 7