From 53b9a10be45be69abe04493ad14fc1d1ef4f92dd Mon Sep 17 00:00:00 2001 From: Mladen Turk Date: Sun, 19 Dec 2004 16:34:43 +0000 Subject: [PATCH] Explain new proxy parameters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@122771 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_proxy.html.en | 137 ++++++++++++++++++++++++++++- docs/manual/mod/mod_proxy.xml | 141 ++++++++++++++++++++++++++++-- 2 files changed, 266 insertions(+), 12 deletions(-) diff --git a/docs/manual/mod/mod_proxy.html.en b/docs/manual/mod/mod_proxy.html.en index 7bc940596c..f1e1a0a5e5 100644 --- a/docs/manual/mod/mod_proxy.html.en +++ b/docs/manual/mod/mod_proxy.html.en @@ -546,6 +546,137 @@ directly </Proxy>

+

New in Apache 2.1, is the ability to set the various connection + parameters to a backend server. The connection parameters are in + the form key=value. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
min0Minumum number of connections that will always + be open to the backend server.
max1...nHard Maximum number of connections that will be + allowed to the backend server. The default for a Hard Maximum + for the number of connections is the number of threads per process in the + active MPM. In the Prefork MPM, this is always 1, while with the Worker MPM + it is controlled by the ThreadsPerChild. + Apache will never create more than the Hard Maximum connections + to the backend server.
smaxmaxUpto the Soft Maximum + 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. + 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. +
timeoutTimeoutConnection timeout in seconds. +
acquire-If set this will be the maximum time to wait for a free + connection in the connection pool. If there is no free connections + in the pool the Apache will return SERVER_BUSY status to + the client. +
keepaliveOffThis parameter should be used when you have a firewall between your + Apache and the backend server, who tend to drop inactive connections. + This flag will told Operating System to send KEEP_ALIVE message + on inactive connections (interval depend on global OS settings, + generally 120ms), and thus prevent the firewall to cut the connection. + To enable keepalive set this property value to the On. +
retry60Connection pool worker retry timeout in seconds. + If the connection pool worker to the backend server is in the error state, + the Apache will not forward any request to that servers untill that timeout + expires. This enables to shut down the backend server for maintenance, + and bring it back online. +
loadfactor1Worker load factor. Used with BalancerMamber. + It is a number between 1 and 100 and defined the load aplied to + the worker. +
route-Route of the worker when used inside load balancer. + The route is a value appended to seesion id. +
redirect-Redirection Route of the worker. This value is usually + set dynamically to enable safe removal of the node from + the cluster. If set all requests without session id will be + redirected to the BalancerMember that has route parametar + equal as this value. +
+ +

If the Proxy directive scheme starts with the + 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. +

+ + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
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. +
nofailoverOffIf set to On the session will break if the worker is in + error state or disabled. Set this value to On if backend servers do not + support session replication. +
timeout0Balancer 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. +
+

+ <Proxy balancer://mycluster stickysession=jsessionid nofailover=On>
+ + BalancerMember http://1.2.3.4:8009
+ BalancerMember http://1.2.3.5:8009
+ BalancerMember http://1.2.3.6:8009
+
+ </Proxy> +

+ +
top

ProxyBadHeader Directive

@@ -769,15 +900,13 @@ through be open to the backend server. Upto the Soft Maximum or smax number of connections will be created on demand. Any connections above smax are subject to a time to live or ttl. Apache - will never create more than the Hard Maximum or hmax connections + will never create more than the Hard Maximum or max connections to the backend server.

- ProxyPass /example http://backend.example.com min=0 smax=5 hmax=20 ttl=60 + ProxyPass /example http://backend.example.com smax=5 max=20 ttl=120 retry=300

- -

When used inside a <Location> section, the first argument is omitted and the local directory is obtained from the <Location>.

diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 081ae2edef..ab3e5fd2c6 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -373,6 +373,137 @@ </Proxy> + +

New in Apache 2.1, is the ability to set the various connection + parameters to a backend server. The connection parameters are in + the form key=value. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
min0Minumum number of connections that will always + be open to the backend server.
max1...nHard Maximum number of connections that will be + allowed to the backend server. The default for a Hard Maximum + for the number of connections is the number of threads per process in the + active MPM. In the Prefork MPM, this is always 1, while with the Worker MPM + it is controlled by the ThreadsPerChild. + Apache will never create more than the Hard Maximum connections + to the backend server.
smaxmaxUpto the Soft Maximum + 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. + 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. +
timeoutTimeoutConnection timeout in seconds. +
acquire-If set this will be the maximum time to wait for a free + connection in the connection pool. If there is no free connections + in the pool the Apache will return SERVER_BUSY status to + the client. +
keepaliveOffThis parameter should be used when you have a firewall between your + Apache and the backend server, who tend to drop inactive connections. + This flag will told Operating System to send KEEP_ALIVE message + on inactive connections (interval depend on global OS settings, + generally 120ms), and thus prevent the firewall to cut the connection. + To enable keepalive set this property value to the On. +
retry60Connection pool worker retry timeout in seconds. + If the connection pool worker to the backend server is in the error state, + the Apache will not forward any request to that servers untill that timeout + expires. This enables to shut down the backend server for maintenance, + and bring it back online. +
loadfactor1Worker load factor. Used with BalancerMamber. + It is a number between 1 and 100 and defined the load aplied to + the worker. +
route-Route of the worker when used inside load balancer. + The route is a value appended to seesion id. +
redirect-Redirection Route of the worker. This value is usually + set dynamically to enable safe removal of the node from + the cluster. If set all requests without session id will be + redirected to the BalancerMember that has route parametar + equal as this value. +
+ +

If the Proxy directive scheme starts with the + 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. +

+ + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
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. +
nofailoverOffIf set to On the session will break if the worker is in + error state or disabled. Set this value to On if backend servers do not + support session replication. +
timeout0Balancer 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. +
+ + <Proxy balancer://mycluster stickysession=jsessionid nofailover=On>
+ + BalancerMember http://1.2.3.4:8009
+ BalancerMember http://1.2.3.5:8009
+ BalancerMember http://1.2.3.6:8009
+
+ </Proxy> +
+ @@ -584,19 +715,13 @@ expressions be open to the backend server. Upto the Soft Maximum or smax number of connections will be created on demand. Any connections above smax are subject to a time to live or ttl. Apache - will never create more than the Hard Maximum or hmax connections + will never create more than the Hard Maximum or max connections to the backend server.

- ProxyPass /example http://backend.example.com min=0 smax=5 hmax=20 ttl=60 + ProxyPass /example http://backend.example.com smax=5 max=20 ttl=120 retry=300 - -

When used inside a Location section, the first argument is omitted and the local directory is obtained from the