From: fhanik Date: Wed, 14 Feb 2007 23:44:27 +0000 (+0000) Subject: Added in documentation specific to the NIO connector and a small connector comparison... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c06418cb6ed81cbe8ef0014b913ee162ac07e1cf;p=tomcat7.0 Added in documentation specific to the NIO connector and a small connector comparison chart git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@507744 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 0ff3e429d..350d218ce 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -37,9 +37,9 @@ public class SocketProperties { protected int bufferPoolSize = 1024*1024*100; /** - * TCP_NO_DELAY option, default is false + * TCP_NO_DELAY option, default is true */ - protected boolean tcpNoDelay = false; + protected boolean tcpNoDelay = true; /** * SO_KEEPALIVE option, default is false */ diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml index 9aa5640c3..d26824069 100644 --- a/webapps/docs/config/http.xml +++ b/webapps/docs/config/http.xml @@ -118,9 +118,11 @@ org.apache.coyote.http11.Http11Protocol - same as HTTP/1.1
org.apache.coyote.http11.Http11NioProtocol - non blocking Java connector
org.apache.coyote.http11.Http11AprProtocol - the APR connector.
- The configuration for both Java connectors are identical, both for http and https. - For more information on the APR connector, please + Take a look at our Connector Comparison chart. + The configuration for both Java connectors are identical, both for http and https.
+ For more information on the APR connector and APR specific SSL settings please visit the APR documentation +

@@ -383,6 +385,76 @@ + + + +

The NIO connector exposes all the low level socket properties that can be used to tune the connector. + Most of these attributes are directly linked to the socket implementation in the JDK so you can find out + about the actual meaning in the JDK API documentation.
+ NoteOn some JDK versions, setTrafficClass causes a problem, a work around for this is to add + the -Djava.net.preferIPv4Stack=true value to your command line

+ + + +

Boolean value, whether to use direct ByteBuffers or java mapped ByteBuffers. Default is true

+
+ +

The socket receive buffer (SO_RCVBUF) size in bytes. Default value is 25188

+
+ +

The socket send buffer (SO_SNDBUF) size in bytes. Default value is 43800

+
+ +

The Nio connector uses a class called NioChannel that holds elements linked to a socket. + To reduce garbage collection, the Nio connector caches these channel objects. + This value specifies the size of this cache. + The default value is 500, and represents that the cache will hold 500 NioChannel objects. + Other values are -1. unlimited cache, and 0, no cache.

+
+ +

The NioChannel pool can also be size based, not used object based. The size is calculated as follows:
+ NioChannel buffer size = read buffer size + write buffer size
+ SecureNioChannel buffer size = application read buffer size + application write buffer size + network read buffer size + network write buffer size
+ The value is in bytes, the default value is 1024*1024*100 (100MB) +

+
+ +

same as the standard setting tcpNoDelay. Default value is false

+
+ +

Boolean value for the socket's keep alive setting (SO_KEEPALIVE). Default is false.

+
+ +

Boolean value for the socket OOBINLINE setting. Default value is true

+
+ +

Boolean value for the sockets reuse address option (SO_REUSEADDR). Default value is true

+
+ +

Boolean value for the sockets so linger option (SO_LINGER). Default value is true. + This option is paired with the soLingerTime value.

+
+ +

Value in seconds for the sockets so linger option (SO_LINGER). Default value is 25 seconds. + This option is paired with the soLinger value.

+
+ +

Value in milliseconds for the sockets read timeout (SO_TIMEOUT). Default value is 5000 milliseconds.

+
+ +

Value between 0 and 255 for the traffic class on the socket, 0x04 | 0x08 | 0x010

+
+ +

The first value for the performance settings. Default is 1, see Socket Performance Options

+
+ +

The second value for the performance settings. Default is 0, see Socket Performance Options

+
+ +

The third value for the performance settings. Default is 1, see Socket Performance Options

+
+
+
@@ -434,6 +506,7 @@ +

You can enable SSL support for a particular instance of this @@ -514,8 +587,26 @@ SSL Configuration HOW-TO.

+ + +

Below is a small chart that shows how the connectors differentiate.

+ + Java Blocking Connector Java Nio Blocking Connector APR Connector + Classname Http11Protocol Http11NioProtocol Http11AprProtocol + Tomcat Version 3.x 4.x 5.x 6.x 6.x 5.5.x 6.x + Support Polling NO YES YES + Polling Size N/A Unlimited - Restricted by mem 1024 + Read HTTP Request Blocking Non Blocking Blocking + Read HTTP Body Blocking Blocking Blocking + Write HTTP Response Blocking Blocking Blocking + SSL Support Java SSL Java SSL Open SSL + SSL Handshake Blocking Non blocking Blocking + Max Connections maxThreads See polling size See polling size + + + - +