If integration with the native webserver is needed for any reason, an AJP connector will provide faster performance than proxied HTTP.
前端apache,后端tomcat,通过ajp协议访问性能优于http协议,随着并发量的提升,效果会更加趋于明显。可以从吞吐率和总时间开销上观察。
(吞吐率:单位时间内计算机的处理请求来描述其并发处理能力)
可以参考下ajp协议的设计
http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html原因总结如下:
1、ajp使用长连接保持webServer和servlet Container的通信,减少了建立tcp连接的开销。可以通过观察tomcat/manager 下serverStatus,ajp建立的连接都处于keepalive的状态。
2、ajp使用一定的协议格式,减少了传递的报文数据大小,节省了带宽。可以通过观察ajp和http 的benchmark报告重看到,Total transferred 一项有明显的区别。
http://dmouse.iteye.com/blog/1354527
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。