From: Mladen Turk Date: Sat, 27 Nov 2004 13:38:47 +0000 (+0000) Subject: Add desription for schedlurer algo and X-Git-Tag: 2.1.2~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2302c7581867f627a94e32f472dba6617490a0c3;p=apache Add desription for schedlurer algo and balancer manager git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106707 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy_balancer.html.en b/docs/manual/mod/mod_proxy_balancer.html.en index c573cfc757..9effff24b3 100644 --- a/docs/manual/mod/mod_proxy_balancer.html.en +++ b/docs/manual/mod/mod_proxy_balancer.html.en @@ -49,11 +49,202 @@ load balancing

Directives

This module provides no directives.

-

See also

+

Topics

+

See also

+
top
+
+

Load balancer scheduler algorithm

+ +

The idea behind this scheduler is the following:

+

lbfactor is how much we expect this worker + to work, or the workers's work quota.

+

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

+

The worker is a member of the load balancer, + usually a remote host serving one of the supported protocols

+

We distribute each worker's work quota to the worker, and then look + which of them needs to work most urgently (biggest lbstatus). This + worker is then selected for work, and its lbstatus reduced by the + total work quota we distributed to all workers. Thus the sum of all + lbstatus does not change.(*)

+

If some workers are disabled, the others will + still be scheduled correctly.

+

If a balancer is configured as follows:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
workerabcd
lbfactor25252525
lbstatus0000
+
+

And b gets disabled, the following schedule is produced:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
lbstatus-5002525
lbstatus-250-2550
lbstatus0000
(repeat)
+
+

That is it schedules: a c d a c d a c d ...

+

The following asymmetric configuration works as one would expect:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
workerab
lbfactor7030
 
lbstatus-3030
lbstatus40-40
lbstatus10-10
lbstatus-2020
lbstatus-5050
lbstatus20-20
lbstatus-1010
lbstatus-4040
lbstatus30-30
lbstatus00
(repeat)
+
+ +

That is after 10 schedules, the schedule repeats and 7 a are selected + with 3 b interspersed.

+
top
+
+

Enabling Balancer Manager Support

+ +

Balancer manager enables dynamic update of balancer + members. You can use balancer manager to change the balace + factor or a particular member, or put it in the off line + mode.

+

This module requires the service of + mod_status. + Balancer manager enables dynamic update of balancer + members. You can use balancer manager to change the balace + factor or a particular member, or put it in the off line + mode. +

+ +

Thus, in order to get the ability of load balancer management, + mod_status and mod_proxy_balancer + have to be present in the server.

+ +

To enable load balancer management for browsers from the foo.com + domain add this code to your httpd.conf + configuration file

+

+ <Location /balancer-manager>
+ SetHandler balancer-manager
+
+ Order Deny,Allow
+ Deny from all
+ Allow from .foo.com
+ </Location> +

+ +

You can now access load balancer manager by using a Web browser + to access the page + http://your.server.name/balancer-manager

+

Available Languages:  en  | diff --git a/docs/manual/mod/mod_proxy_balancer.xml b/docs/manual/mod/mod_proxy_balancer.xml index 20fccc13c3..b57d7e40fb 100644 --- a/docs/manual/mod/mod_proxy_balancer.xml +++ b/docs/manual/mod/mod_proxy_balancer.xml @@ -48,4 +48,191 @@ load balancing mod_proxy +

+ Load balancer scheduler algorithm +

The idea behind this scheduler is the following:

+

lbfactor is how much we expect this worker + to work, or the workers's work quota.

+

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

+

The worker is a member of the load balancer, + usually a remote host serving one of the supported protocols

+

We distribute each worker's work quota to the worker, and then look + which of them needs to work most urgently (biggest lbstatus). This + worker is then selected for work, and its lbstatus reduced by the + total work quota we distributed to all workers. Thus the sum of all + lbstatus does not change.(*)

+

If some workers are disabled, the others will + still be scheduled correctly.

+

If a balancer is configured as follows:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
workerabcd
lbfactor25252525
lbstatus0000
+
+

And b gets disabled, the following schedule is produced:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
lbstatus-5002525
lbstatus-250-2550
lbstatus0000
(repeat)
+
+

That is it schedules: a c d a c d a c d ...

+

The following asymmetric configuration works as one would expect:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
workerab
lbfactor7030
 
lbstatus-3030
lbstatus40-40
lbstatus10-10
lbstatus-2020
lbstatus-5050
lbstatus20-20
lbstatus-1010
lbstatus-4040
lbstatus30-30
lbstatus00
(repeat)
+
+ +

That is after 10 schedules, the schedule repeats and 7 a are selected + with 3 b interspersed.

+
+ +
+ Enabling Balancer Manager Support +

Balancer manager enables dynamic update of balancer + members. You can use balancer manager to change the balace + factor or a particular member, or put it in the off line + mode.

+

This module requires the service of + mod_status. + Balancer manager enables dynamic update of balancer + members. You can use balancer manager to change the balace + factor or a particular member, or put it in the off line + mode. +

+ +

Thus, in order to get the ability of load balancer management, + mod_status and mod_proxy_balancer + have to be present in the server.

+ +

To enable load balancer management for browsers from the foo.com + domain add this code to your httpd.conf + configuration file

+ + <Location /balancer-manager>
+ SetHandler balancer-manager
+
+ Order Deny,Allow
+ Deny from all
+ Allow from .foo.com
+ </Location> +
+ +

You can now access load balancer manager by using a Web browser + to access the page + http://your.server.name/balancer-manager

+
+