Detailed reference: http: // tomcat.apache.org/tomcat-7.0-doc/apr.htmlhttp://www.365mini.com/page/tomcat-connector-mode.htm
Operating environment: rhel6.3 x86_x64, tomcat7.0.42
Tomcat connector three operating modes: BIO, NIO, and Apr. You can simply understand, on the performance: BIO<NIO<=APR
Where bio is the default operating mode, i.e. (Server.xml):
<port= "8080" protocolconnectiontimeout Redirectport = "8443" />
NIO, just modify the protocol to:
<port= "8080" protocol= " Org.apache.coyote.http11.Http11NioProtocol " connectiontimeout=" 20000 " Redirectport = "8443"/>
If you want to enter APR mode of operation, it is a little bit troublesome. In addition to modifying protocol:
<connector port="8080 " protocol= " Org.apache.coyote.http11.Http11AprProtocol "connectiontimeout="20000 " redirectport="8443" />
You will also need to install some components to build the APR runtime Environment (OpenSSL general system default installation) by:
#InstallApr &TCNATIVECD Apr-1.5.1/./configure--prefix=/tomcat/lib/Apr Make Make InstallCD Apr-iconv-1.2.1/./configure--prefix=/tomcat/lib/apr-iconv--with-apr=/tomcat/lib/Apr Make Make InstallCD Apr-util-1.5.4/./configure--prefix=/tomcat/lib/apr-util--with-apr=/tomcat/lib/apr--with-apr-iconv=/tomcat/lib/apr-Iconv Make Make InstallCD Tomcat-native-1.1. --src/jni/native/./configure--prefix=/tomcat/lib/apr--with-apr=/tomcat/lib/apr--with-java-home=$JAVA _home Make Make InstallExport Ld_library_path=/tomcat/lib/apr/Lib: $LD _library_path#startup the TomcatBin/startup.SH#访问 http://Localhost:8080/manager/status/all View run mode or view boot log
All Files Packaged: Http://pan.baidu.com/s/1qW9IPQk
Three modes of operation for TOMCAT connector