2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_lbmethod_bytraffic.xml.meta">
25 <name>mod_lbmethod_bytraffic</name>
26 <description>Weighted Traffic Counting load balancer scheduler algorithm for <module
27 >mod_proxy_balancer</module></description>
28 <status>Extension</status>
29 <sourcefile>mod_lbmethod_bytraffic.c</sourcefile>
30 <identifier>lbmethod_bytraffic_module</identifier>
31 <compatibility>Split off from <module>mod_proxy_balancer</module> in 2.3</compatibility>
34 <p>This module does not provide any configuration directives of its own.
35 It requires the services of <module>mod_proxy_balancer</module>, and
36 provides the <code>bytraffic</code> load balancing method..</p>
38 <seealso><module>mod_proxy</module></seealso>
39 <seealso><module>mod_proxy_balancer</module></seealso>
41 <section id="traffic">
42 <title>Weighted Traffic Counting Algorithm</title>
43 <p>Enabled via <code>lbmethod=bytraffic</code>, the idea behind this
44 scheduler is very similar to the Request Counting method, with
45 the following changes:</p>
47 <p><dfn>lbfactor</dfn> is <em>how much traffic, in bytes, we want
48 this worker to handle</em>. This is also a normalized value
49 representing their "share" of the amount of work to be done,
50 but instead of simply counting the number of requests, we take
51 into account the amount of traffic this worker has either seen
54 <p>If a balancer is configured as follows:</p>
67 <p>Then we mean that we want <var>b</var> to process twice the
68 amount of bytes than <var>a</var> or <var>c</var> should. It does
69 not necessarily mean that <var>b</var> would handle twice as
70 many requests, but it would process twice the I/O. Thus, the
71 size of the request and response are applied to the weighting
72 and selection algorithm.</p>
74 <p>Note: input and output bytes are weighted the same.</p>