19

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?

Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
Arun
  • 191
  • 1
  • 3

1 Answers1

31

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
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
Stu Thompson
  • 38,370
  • 19
  • 110
  • 156