mod_lbmethod_bytraffic.xml revision a357a8bf5e65ac967c6faea297fbd6d1f8373c05
35538d7a7df83c7d2713ae86255cebd799715f54Mark Andrews<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews<!-- $LastChangedRevision$ -->
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews Licensed to the Apache Software Foundation (ASF) under one or more
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews contributor license agreements. See the NOTICE file distributed with
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews this work for additional information regarding copyright ownership.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews The ASF licenses this file to You under the Apache License, Version 2.0
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews (the "License"); you may not use this file except in compliance with
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews the License. You may obtain a copy of the License at
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews Unless required by applicable law or agreed to in writing, software
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews distributed under the License is distributed on an "AS IS" BASIS,
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein See the License for the specific language governing permissions and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein limitations under the License.
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews<modulesynopsis metafile="mod_lbmethod_bytraffic.xml.meta">
b1b3495eba72ea2b7270c5cd62b0bb824de74e05Mark Andrews<description>Weighted Traffic Counting load balancer scheduler algorithm for <module
b1b3495eba72ea2b7270c5cd62b0bb824de74e05Mark Andrews<sourcefile>mod_lbmethod_bytraffic.c</sourcefile>
77b101ced9801cdb226919784bfc1aa0650ace6aMark Andrews<identifier>lbmethod_bytraffic_module</identifier>
77b101ced9801cdb226919784bfc1aa0650ace6aMark Andrews<compatibility>Split off from <module>mod_proxy_balancer</module> in 2.3</compatibility>
b1b3495eba72ea2b7270c5cd62b0bb824de74e05Mark Andrews<p>This module does not provide any configuration directives of its own.
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark AndrewsIt requires the services of <module>mod_proxy_balancer</module>, and
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrewsprovides the <code>bytraffic</code> load balancing method..</p>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson<seealso><module>mod_proxy</module></seealso>
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews<seealso><module>mod_proxy_balancer</module></seealso>
77b101ced9801cdb226919784bfc1aa0650ace6aMark Andrews <title>Weighted Traffic Counting Algorithm</title>
92551304a9abff9284de5b79a48e83d781989339Mark Andrews <p>Enabled via <code>lbmethod=bytraffic</code>, the idea behind this
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews scheduler is very similar to the Request Counting method, with
fc14ca7a8f340f98884c504b3c4c3f40d7393fa9Mark Andrews the following changes:</p>
92551304a9abff9284de5b79a48e83d781989339Mark Andrews <p><dfn>lbfactor</dfn> is <em>how much traffic, in bytes, we want
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews this worker to handle</em>. This is also a normalized value
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews representing their "share" of the amount of work to be done,
66a38d16933a28a0110079a9920ba359d2aad130Danny Mayer but instead of simply counting the number of requests, we take
8d0ee7a153381d98f6c1e6e9bfe6b73659433666Brian Wellington into account the amount of traffic this worker has seen.</p>
b1b3495eba72ea2b7270c5cd62b0bb824de74e05Mark Andrews <p>Then we mean that we want <var>b</var> to process twice the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein amount of bytes than <var>a</var> or <var>c</var> should. It does
7e8c1a13e97448db2ec17d05c4917939a12aa9c0Mark Andrews not necessarily mean that <var>b</var> would handle twice as
8d0ee7a153381d98f6c1e6e9bfe6b73659433666Brian Wellington many requests, but it would process twice the I/O. Thus, the
8d0ee7a153381d98f6c1e6e9bfe6b73659433666Brian Wellington size of the request and response are applied to the weighting
4e1d3e67cdc76609bad5f0310ac48de10b442b9fMark Andrews and selection algorithm.</p>
8d0ee7a153381d98f6c1e6e9bfe6b73659433666Brian Wellington</modulesynopsis>