Tomcat can work in two modes:
BIO (one thread per connection) or NIO (much more connections than threads).
Tomcat7 is BIO by default, although the consensus seems to be "not using Bio because Nio is better in every way." You set this using the "protocol" parameter in the server.xml file - the BIO will be "HTTP1.1" or "org.apache.coyote.http11.Http11Protocol", and the NIO will be "org.apache.coyote.http11.Http11NioProtocol"
If you use BIO, I believe that they should be more or less the same. If you use NIO, then in fact "maxConnections = 1000" and "maxThreads = 10" may even be reasonable. By default, maxConnections = 10,000 and maxThreads = 200 are used. With NIO, each thread can serve any number of connections, switching back and forth, but keeping the connection, so you donβt have to do all the usual handshakes, which are especially time-consuming with HTTPS, but even with HTTP problem. You can adjust the "keepAlive" parameter to keep in touch longer, and this should speed things up.
Tim Cooper Sep 10 '14 at 12:26 2014-09-10 12:26
source share