Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache to tomcat: mod_jk vs mod_proxy

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?

like image 251
cherouvim Avatar asked Jul 04 '09 10:07

cherouvim


People also ask

What is difference between Mod_jk and mod_proxy?

AJP vs HTTPWhen using mod_jk , you are using the AJP . When using mod_proxy you will use HTTP or HTTPS . And this is essentially what makes all the difference.

What is the use of Mod_jk in Apache?

The mod_jk connector is an Apache HTTPD module that allows HTTPD to communicate with Apache Tomcat instances over the AJP protocol. The module is used in conjunction with Tomcat's AJP Connector component.

What is mod_proxy in Apache?

mod_proxy , the main proxy module Apache module for redirecting connections; it allows Apache to act as a gateway to the underlying application servers. mod_proxy_http , which adds support for proxying HTTP connections.

How does Apache and Tomcat work together?

Tomcat can also be run as an add-on to the Apache HTTP Server (or Microsoft IIS) - as the Java servlet/JSP container. In this combination, Tomcat executes the Java servlets and JSPs, the Apache serves the static HTML pages and performs other server-side functions such as CGI, PHP, SSI, etc.


1 Answers

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 
like image 110
cherouvim Avatar answered Oct 11 '22 23:10

cherouvim