What is the meaning of the "Load" column in Apache balancer-manager?

3.1k Views Asked by At

I've set up the Apache (2.4) load-balancer which is working okay. To monitor its performance, I enabled the balancer-manager handler, which shows the status of the balancers.

I noticed a "Load" column, which was not present in version 2.2, with a value that may be negative, but I don't understand its meaning nor I was able to find documentation relative to this.

enter image description here

Can anyone explain the meaning of that value or point me to the right documentation?

3

There are 3 best solutions below

1
On

i too want to know to description for others column like BUSY, ELECTED etc.. my LB has BUSY over 100 already.. i though BUSY should not exceed 100 ( as in 100% server busyness or something )

0
On

The Load value is populated by lbstatus based on this line of code:

                ap_rprintf(r, "<td>%d</td><td>", worker->s->lbstatus);

in https://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?view=markup#l1767 (line might changed when the code modified)

Since your method is by request, lbstatus is specified by mod_lbmethod_byrequests which define:

lbstatus is how urgent this worker has to work to fulfill its quota of work.

Details on the algorithm can be found here: https://httpd.apache.org/docs/2.4/mod/mod_lbmethod_byrequests.html

0
On

I now understood, how the calculation of "Load" works. Here is a I think more simpler example than on the apache documents page.

Let's say we have 3 worker and a configured load factor of 1.

1) Start

a | b | c
--+---+---
0 | 0 | 0

add the load factor of 1 to all workers

a | b | c
--+---+---
1 | 1 | 1

now select the one with highest value --> a and decrease by the sum of the factor of all (=3) - this is the selected worker

a  | b | c
---+---+---
-2 | 1 | 1

2) next round, add again 1 to all

a  | b | c
---+---+---
-1 | 2 | 2

now select the one with highest value --> b and decrease by the sum of the factor of all (=3) - this is the selected worker

a  | b  | c
---+----+----
-1 | -1 | 2

3) next round, add again 1

a  | b  | c
---+----+----
 0 | 0  | 3

now select the one with highest value --> c and decrease by the sum of the factor of all (=3) - this is the selected worker

a  | b  | c
---+----+----
 0 | 0  | 0

startover again :)

I hope this helps others.