apache to tomcat: mod_jk vs mod_proxy

别等时光非礼了梦想. 提交于 2019-11-26 11:49:27

问题


What are the advantages and disadvantages of using mod_jk and mod_proxy for fronting a tomcat instance with apache?

I\'ve been using mod_jk in production for years but I\'ve heard that it\'s \"the old way\" of fronting tomcat. Should I consider changing? Would there be any benefits?


回答1:


A pros/cons comparison for those modules exists on http://blog.jboss.org/

mod_proxy

* Pros:
      o No need for a separate module compilation and maintenance. mod_proxy,
        mod_proxy_http, mod_proxy_ajp and mod_proxy_balancer comes as part of 
        standard Apache 2.2+ distribution
      o Ability to use http https or AJP protocols, even within the same 
        balancer.
* Cons:
      o mod_proxy_ajp does not support large 8K+ packet sizes.
      o Basic load balancer
      o Does not support Domain model clustering

mod_jk

* Pros:
      o Advanced load balancer
      o Advanced node failure detection
      o Support for large AJP packet sizes
* Cons:
      o Need to build and maintain a separate module



回答2:


If you wish to stay in Apache land, you can also try the newer mod_proxy_ajp, which uses the AJP protocol to communicate with Tomcat instead of plain old HTTP, but which leverages mod_proxy to do the work.




回答3:


See also:

http://wiki.apache.org/tomcat/FAQ/Connectors

http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache



来源:https://stackoverflow.com/questions/1081918/apache-to-tomcat-mod-jk-vs-mod-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!