I would like to know the internals of the tomcat NIO connector. How exactly are threads used when we create a servlet that implements CometProcessor?Is it still one thread p
NIO use fewer thread, it means that the tcp/ip port use is fewer.
You know the port is 1 to 65534, so we can say that NIO can reach a higher TPS (Transactions Per Second) than BIO
I tested both protocol :HTTP/1.1 and org.apache.coyote.http11.Http11NioProtocol
with same web-project, same host, and same server.xml but the protocol.
Use jmeter for test.
I set 1000 thread to run request, when HTTP/1.1 in a few minutes, the host use port is more than 30000 and the TPS is 300 only!
When org.apache.coyote.http11.Http11NioProtocol, the max count of use port is never overstep 3000 and the tps is more than 1200!