Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawbacks of Tomcat Http11NioProtocol [closed]

Tags:

tomcat

nio

With Tomcat 6.0.x, we can use Http11NioProtocol and get scalable performance. Is there any specific reason/drawback of using Http11NioProtocol, that Tomcat is not using this protocol as a default protocol?

like image 429
Arun Avatar asked Nov 23 '10 20:11

Arun


People also ask

How many concurrent requests can Tomcat handle?

The default installation of Tomcat sets the maximum number of HTTP servicing threads at 200. Effectively, this means that the system can handle a maximum of 200 simultaneous HTTP requests.

What is Jsse Tomcat?

JSSE , which is Tomcat web server's default configuration, is supported by default, and included in all JDKs after version 1.4. So, if you don't even know what APR is, you only need to remove the comment from this entry and add some additional information to allow Tomcat web server to find your keystore .

What is Max connections in Tomcat?

The default value is 10. maxConnections : the total number of concurrent connections that the server will accept and process. Any additional incoming connections will be placed in a queue until a thread becomes available. The default value for NIO/NIO2 mode is 10,000 and 8,192 for APR/native.

Does Tomcat include OpenSSL?

OpenSSL is not part of Tomcat, but the OpenSSL library is included in the Tomcat 6 windows binary packages available from apache.org. The library code is integrated into a Tomcat dll, there is no openssl.exe included.


1 Answers

In the general context of NIO, it usually pays to run some production benchmark measurements to ensure you are getting the performance you think you are. Remember that Http11NioProtocol does some odd things, like simulated blocking, to achieve drop-in connector behavior--this is not free and could potentially be less performant that the default Http11Protocol connector.

We are satisfied with the performance of our webapp with the default Http11Protocol connector. Hundreds of millions of HTTP requests per month on 5 year old hardware.

If performance really is a concern, you should investigate taking the more labor intensive step of using the AJP Connector Http11AprProtocol. It is a part native connector written in C which reportedly is solidly faster. But getting it up and running takes more than a server.xml change.

I've personally had problems with Http11NioProtocol and a 3rd party open source API library. (OpenAMF, a dated AMF0 POJO thingy.) Meaning, it didn't work. But if it works for you, then cool.

In summary:

  • The benefits of the NIO connector are debatable
  • Run benchmarks
  • Consider the AJP connector
like image 87
Stu Thompson Avatar answered Oct 13 '22 01:10

Stu Thompson