From 62cb62c571f1d558f32eccf312732a4e054bca74 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 17 Aug 2006 19:21:33 +0000 Subject: [PATCH] Update docs for proxy: 1. Put params in abc order 2. Add hot-standby example 3. Add in new features that hadn't been documented yet (lbset, ...) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@432352 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_proxy.xml | 152 ++++++++++++++++++++-------------- 1 file changed, 88 insertions(+), 64 deletions(-) diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index cc7eca1a5e..387162c756 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -556,20 +556,6 @@ expressions number of connections will be created on demand. Any connections above smax are subject to a time to live or ttl. - ttl - - - Time To Live for the inactive connections above the - smax connections in seconds. Apache will close all - connections that has not been used inside that time period. - - timeout - Timeout - Connection timeout in seconds. - If not set the Apache will wait until the free connection - is available. This directive is used for limiting the number - of connections to the backend server together with max - parameter. - acquire - If set this will be the maximum time to wait for a free @@ -577,6 +563,20 @@ expressions in the pool the Apache will return SERVER_BUSY status to the client. + flushpackets + off + Determines whether the proxy module will auto-flush the output + brigade after each "chunk" of data. 'off' means that it will flush + only when needed, 'on' means after each chunk is sent and + 'auto' means poll/wait for a period of time and flush if + no input has been received for 'flushwait' milliseconds. + Currently this is in effect only for AJP. + + flushwait + 10 + The time to wait for additional input, in milliseconds, before + flushing the output brigade if 'flushpackets' is 'auto'. + keepalive Off This parameter should be used when you have a firewall between your @@ -586,13 +586,11 @@ expressions generally 120ms), and thus prevent the firewall to drop the connection. To enable keepalive set this property value to On. - retry - 60 - Connection pool worker retry timeout in seconds. - If the connection pool worker to the backend server is in the error state, - Apache will not forward any requests to that server until the timeout - expires. This enables to shut down the backend server for maintenance, - and bring it back online later. + lbset + 0 + Sets the load balancer cluster set that the worker is a member + of. The load balancer will try all members of a lower numbered + lbset before trying higher numbered ones. loadfactor 1 @@ -600,10 +598,19 @@ expressions It is a number between 1 and 100 and defines the normalized weighted load applied to the worker. - route - - - Route of the worker when used inside load balancer. - The route is a value appended to seesion id. + ping + 0 + Ping property told webserver to send a CPING + request on ajp13 connection before forwarding to it a request. + The parameter is the delay in seconds to wait for the + CPONG reply. + This features has been added to avoid problem with hung and + busy Tomcat's and require ajp13 ping/pong support which has + been implemented on Tomcat 3.3.2+, 4.1.28+ and 5.0.13+. + It will inrease the network traffic during the normal operation + which could be an issue for you, but it will lower down the + traffic in case some of the cluster nodes are down or buys. + Currently this is in effect only for AJP. redirect - @@ -613,42 +620,41 @@ expressions redirected to the BalancerMember that has route parametar equal as this value. + retry + 60 + Connection pool worker retry timeout in seconds. + If the connection pool worker to the backend server is in the error state, + Apache will not forward any requests to that server until the timeout + expires. This enables to shut down the backend server for maintenance, + and bring it back online later. + + route + - + Route of the worker when used inside load balancer. + The route is a value appended to seesion id. + status - Single letter value defining the initial status of - this worker: 'D' is disabled, 'S' is stopped and 'E' is - in an error state. Status can be set (which is the default) + this worker: 'D' is disabled, 'S' is stopped, 'H' is hot-standby + and 'E' is in an error state. Status can be set (which is the default) by prepending with '+' or cleared by prepending with '-'. Thus, a setting of 'S-E' sets this worker to Stopped and clears the in-error flag. - flushpackets - off - Determines whether the proxy module will auto-flush the output - brigade after each "chunk" of data. 'off' means that it will flush - only when needed, 'on' means after each chunk is sent and - 'auto' means poll/wait for a period of time and flush if - no input has been received for 'flushwait' milliseconds. - Currently this is in effect only for AJP. - - flushwait - 10 - The time to wait for additional input, in milliseconds, before - flushing the output brigade if 'flushpackets' is 'auto'. + timeout + Timeout + Connection timeout in seconds. + If not set the Apache will wait until the free connection + is available. This directive is used for limiting the number + of connections to the backend server together with max + parameter. - ping - 0 - Ping property told webserver to send a CPING - request on ajp13 connection before forwarding to it a request. - The parameter is the delay in seconds to wait for the - CPONG reply. - This features has been added to avoid problem with hung and - busy Tomcat's and require ajp13 ping/pong support which has - been implemented on Tomcat 3.3.2+, 4.1.28+ and 5.0.13+. - It will inrease the network traffic during the normal operation - which could be an issue for you, but it will lower down the - traffic in case some of the cluster nodes are down or buys. - Currently this is in effect only for AJP. + ttl + - + Time To Live for the inactive connections above the + smax connections in seconds. Apache will close all + connections that has not been used inside that time period. @@ -657,24 +663,23 @@ expressions balancer:// then a virtual worker that does not really communicate with the backend server will be created. Instead it is responsible for the management of several "real" workers. In that case the special set of - parameters can be add to this virtual worker. + parameters can be add to this virtual worker. See mod_proxy_balancer + for more information about how the balancer works.

- + - - - + + @@ -682,17 +687,20 @@ expressions error state or disabled. Set this value to On if backend servers do not support session replication. + + + - - -
Parameter Default Description
lbmethod-byrequests Balancer load-balance method. Select the load-balancing scheduler method to use. Either byrequests, to perform weighted request counting or bytraffic, to perform weighted traffic byte count balancing. Default is byrequests.
stickysession-Balancer sticky session name. The value is usually set to something - like JSESSIONID or PHPSESSIONID, - and it depends on the backend application server that support sessions. +
maxattempts1Maximum number of failover attempts before giving up.
nofailover Off
stickysession-Balancer sticky session name. The value is usually set to something + like JSESSIONID or PHPSESSIONID, + and it depends on the backend application server that support sessions. +
timeout 0 Balancer timeout in seconds. If set this will be the maximum time to wait for a free worker. Default is not to wait.
maxattempts1Maximum number of failover attempts before giving up. -
+

A sample balancer setup

ProxyPass /special-area http://special.example.com/ smax=5 max=10
ProxyPass / balancer://mycluster/ stickysession=jsessionid nofailover=On
@@ -705,6 +713,22 @@ expressions </Proxy>
+ +

Setting up a hot-standby, that will only be used if no other + members are available

+ + ProxyPass / balancer://hotcluster/
+ <Proxy balancer://hotcluster>
+ + BalancerMember http://1.2.3.4:8009 loadfactor=1
+ BalancerMember http://1.2.3.5:8009 loadfactor=2
+ # The below is the hot standby
+ BalancerMember http://1.2.3.6:8009 status=+H
+ ProxySet lbmethod=bytraffic +
+ </Proxy> +
+

When used inside a Location section, the first argument is omitted and the local -- 2.49.0