apache到tomcat: mod_jk vs mod_proxy。

时间:2022-01-10 14:09:45

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

使用mod_jk和mod_proxy来与apache共享tomcat实例的优点和缺点是什么?

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?

多年来我一直在使用mod_jk,但我听说这是“老方法”,它是面向tomcat的。我应该考虑改变吗?会有什么好处吗?

3 个解决方案

#1


83  

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

在http://blog.jboss.org/上存在对这些模块的利弊比较。

mod_proxy

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

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


26  

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.

如果您希望驻留在Apache land,您也可以尝试使用新的mod_proxy_ajp,它使用AJP协议与Tomcat通信,而不是普通的旧HTTP,但是它利用mod_proxy来完成工作。

#3


8  

See also:

参见:

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

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

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

http://confluence.atlassian.com/display/DOC/Running +融合+在+ Apache

#1


83  

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

在http://blog.jboss.org/上存在对这些模块的利弊比较。

mod_proxy

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

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


26  

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.

如果您希望驻留在Apache land,您也可以尝试使用新的mod_proxy_ajp,它使用AJP协议与Tomcat通信,而不是普通的旧HTTP,但是它利用mod_proxy来完成工作。

#3


8  

See also:

参见:

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

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

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

http://confluence.atlassian.com/display/DOC/Running +融合+在+ Apache