To find out,Tomcat supports three ways to receive requests: BIO, NIO, APR.
1:bio mode, blocking I/O operations use traditional Java I/O operations,TOMCAT7 The following versions are run in bio mode by default, because each request is created with a thread to handle, with a large thread overhead , cannot handle high concurrency scenarios, and has the lowest performance in three modes
The configuration is as follows (/conf/server.xml in the Tomcat installation directory):
Tomcat starts as follows and sees http-bio-8080 as the Bio mode:
The 2:nio method is a new I/O operation (i.e. the Java.nio package and its child packages) provided by Java SE 1.4 and subsequent versions, which is a buffer-based, and can provide non-blocking i/ o operational Java API, which has better concurrency performance than traditional I/O operations (bio). Tomcat version 8 and above default NIO mode
The configuration is as follows :
Tomcat starts as follows and sees http-nio-8080 as the NIO pattern:
Tomcat Performance Optimization open NIO non-blocking mode