AJP
rmalayter
nginx-forum at nginx.us
Thu Oct 25 16:31:11 UTC 2012
Jérôme Loyet Wrote:
-------------------------------------------------------
> We were in the same situation and didn't want to take the risk to use
> a third party module, so we switched to HTTP and it's just perfect.
>
> my 2 cents ;)
We did the same here. Now that nginx does keep-alives to the back-ends,
there's really no advantage to using AJP between the web server and Tomcat.
In fact, our internal load testing showed nginx->HTTP->Tomcat performing
marginally better than Apache->AJP->Tomcat with Tomcat serving a simple test
JSP. I suspect this is because the HTTP code in Tomcat has been optimized
far more than the AJP code. However, in the real world your bottlenecks will
always be DB, disk IO, and memory/garbage collection caused by your app at
the Tomcat layer.
Profile your app, and find out where the bottlenecks actually are. Address
the worst ones first. I suspect communication overhead between your web
server and Tomcat isn't even visible no matter what you use. Proper caching,
efficient client-side layout and script, DB query tuning, etc. all matter
far more. Spend whatever optimization time you have on that which will make
a real difference for the end-user.
--
RPM
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232172,232225#msg-232225
More information about the nginx
mailing list