From: markt Date: Mon, 1 Feb 2010 15:23:30 +0000 (+0000) Subject: Sync docs and APR/native connector config X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=884d5b81d3770968fbe565b50b4ca8552a6fd575;p=tomcat7.0 Sync docs and APR/native connector config git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@905305 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/apr.xml b/webapps/docs/apr.xml index 712414163..b3d056133 100644 --- a/webapps/docs/apr.xml +++ b/webapps/docs/apr.xml @@ -169,35 +169,9 @@ - -

- When APR is enabled, the AJP connector will use a socket poller for keepalive, increasing - scalability of the server. As AJP is designed around a pool of persistent (or almost - persistent) connections, this will reduce significantly the amount of processing threads - needed by Tomcat. Unlike the HTTP connector, the AJP connector cannot use sendfile to optimize - static file processing. -

- -

- The following attributes are supported in the AJP APR connector in addition to the ones supported - in the regular AJP connector: -

- - - -

Duration of a poll call. Lowering this value will slightly decrease latency of connections - being kept alive in some cases, but will use more CPU as more poll calls are being made. The - default value is 2000 (5ms).

-
- - -

Amount of sockets that the poller responsible for polling kept alive connections can hold at a - given time. Extra connections will be closed right away. The default value is 8192, corresponding to - 8192 keepalive connections.

-
- -
+

For AJP configuration, see the AJP + connector configuration documentation.

diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index ae6f1c61b..f90eca4b1 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -224,8 +224,27 @@

They support the following additional attributes (in addition to the common attributes listed above):

+

The BIO and APR/native implementations (there is no NIO implementation for + APR) both support the following additional attributes in addition to the + standard Connector attributes listed above:

+ + +

The maximum queue length for incoming connection requests when + all possible request processing threads are in use. Any requests + received when the queue is full will be refused. The default + value is 100.

+
+ + +

The number of threads to be used to accept connections. Increase this + value on a multi CPU machine, although you would never really need more + than 2. Also, with a lot of non keep alive connections, you + might want to increase this value as well. Default value is + 1.

+
+

For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified @@ -235,29 +254,25 @@ interface.

- -

The maximum queue length for incoming connection requests when - all possible request processing threads are in use. Any requests - received when the queue is full will be refused. The default - value is 100.

-
- - -

The size of the output buffer to use. If less than or equal to zero, - then output buffering is disabled. The default value is -1 - (i.e. buffering disabled)

+ +

The number of milliseconds during which the sockets used by this + Connector will linger when they are closed. + The default value -1 which disables this option.

The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be - presented. The default value is infinite (i.e. no timeout).

+ presented. The default value is 60000 (i.e. 60 seconds).

-

A reference to the name in an Executor element. - If this attribute is enabled, and the named executor exists, the connector will - use the executor, and all the other thread attributes will be ignored.

+

A reference to the name in an Executor + element. If this attribute is set, and the named executor exists, the + connector will use the executor, and all the other thread attributes will + be ignored. Note that if a shared executor is not specified for a + connector then the connector will use a private, internal executor to + provide the thread pool.

@@ -276,6 +291,11 @@ execute tasks using the executor rather than an internal thread pool.

+ +

The minimum number of threads always kept running. If not specified, + the default of 10 is used.

+
+

This attribute sets the maximum AJP packet size in Bytes. The maximum value is 65536. It should be the same as the max_packet_size @@ -285,31 +305,32 @@ value is 8192.

- + +

The protocol handler caches Processor objects to speed up performance. + This setting dictates how many of these objects get cached. + -1 means unlimited, default is 200. Set this + value somewhere close to your maxThreads value.

+
+ +

Only requests from workers with this secret keyword will be accepted.

- -

If true and a secret has been configured, a correctly formatted AJP - request (that includes the secret) will shutdown the Tomcat instance - associated with this connector. This is set to false by - default.

-
- - -

If set to true, then a random value for - request.secret will be generated. It is for use with - request.shutdownEnabled. This is set to false - by default.

-
-

If set to true, the TCP_NO_DELAY option will be set on the server socket, which improves performance under most circumstances. This is set to true by default.

+ +

The priority of the request processing threads within the JVM. + The default value is java.lang.Thread#NORM_PRIORITY. + See the JavaDoc for the java.lang.Thread class for more details on + what this priority means. +

+
+

If set to true, the authentication will be done in Tomcat. Otherwise, the authenticated principal will be propagated from the native @@ -321,6 +342,113 @@ + + +

The BIO implementation supports the following Java TCP socket attributes + in addition to the common Connector and AJP attributes listed above.

+ + + +

(int)The socket receive buffer (SO_RCVBUF) size in bytes. JVM default + used if not set.

+
+ +

(int)The socket send buffer (SO_SNDBUF) size in bytes. JVM default + used if not set.

+
+ +

(bool)This is equivalent to standard attribute + tcpNoDelay.

+
+ +

(bool)Boolean value for the socket's keep alive setting + (SO_KEEPALIVE). JVM default used if not set.

+
+ +

(bool)Boolean value for the socket OOBINLINE setting. JVM default + used if not set.

+
+ +

(bool)Boolean value for the sockets reuse address option + (SO_REUSEADDR). JVM default used if not set.

+
+ +

(bool)Boolean value for the sockets so linger option (SO_LINGER). + A value for the standard attribute connectionLinger + that is >=0 is equivalent to setting this to true. + A value for the standard attribute connectionLinger + that is <0 is equivalent to setting this to false. + Both this attribute and soLingerTime must be set else the + JVM defaults will be used for both.

+
+ +

(int)Value in seconds for the sockets so linger option (SO_LINGER). + This is equivalent to standard attribute + connectionLinger. + Both this attribute and soLingerOn must be set else the + JVM defaults will be used for both.

+
+ +

This is equivalent to standard attribute + connectionTimeout.

+
+ +

(byte)Value between 0 and 255 for the + traffic class on the socket. JVM default used if not set.

+

NoteOn some JDK versions, setting + soTrafficClass causes a problem. A work around for this + is to add the -Djava.net.preferIPv4Stack=true value to your + JVM options.

+
+ +

(int)The first value for the performance settings. See + Socket Performance Options + All three performance attributes must be set else the JVM defaults will + be used for all three.

+
+ +

(int)The second value for the performance settings. See + Socket Performance Options + All three performance attributes must be set else the JVM defaults will + be used for all three.

+
+ +

(int)The third value for the performance settings. See + Socket Performance Options + All three performance attributes must be set else the JVM defaults will + be used for all three.

+
+ +

(int) The timeout for a socket unlock. When a connector is stopped, it will try to release the acceptor thread by opening a connector to itself. + The default value is 250 and the value is in milliseconds

+
+
+ + + + +

The APR/native implementation supports the following attributes in + addition to the common Connector and AJP attributes listed above.

+ + + +

Duration of a poll call. Lowering this value will slightly decrease + latency of connections being kept alive in some cases, but will use more + CPU as more poll calls are being made. The default value is 2000 (2ms). +

+
+ + +

Amount of sockets that the poller responsible for polling kept alive + connections can hold at a given time. Extra connections will be closed + right away. The default value is 8192, corresponding to 8192 keep-alive + connections.

+
+ +
+ +
+ @@ -330,6 +458,26 @@ +
+ + + +

The proxyName and proxyPort attributes can + be used when Tomcat is run behind a proxy server. These attributes + modify the values returned to web applications that call the + request.getServerName() and request.getServerPort() + methods, which are often used to construct absolute URLs for redirects. + Without configuring these attributes, the values returned would reflect + the server name and port on which the connection from the proxy server + was received, rather than the server name and port to whom the client + directed the original request.

+ +

For more information, see the + Proxy Support HOW-TO.

+ +
+ +