mod_proxy vs. mod_jk, or direct access ?


Let me visualize the 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

—————————————————————————————————–

after trying both it turned out that both are very good if you have to host on apache and glassfish at the same time.
but when it comes to hosting only on glassfish(make it listen on port 80) it’s absolutely the DIRECT ACCESS .

Glassfish is one of the best application servers worldwide, and it’s free to use.
and it has the ability to host multi-domain names on the same server IP by defining a Virtual Server for each domain/application on a domain.
in case if you have multi-domain names on the same application it supports it too, in the Virtual Server Creation/Edit form just define your list of domain names or hosts or IPs comma-separated in Hosts field. and define your HTTP Listeners(which is the Port 80) and define your Default Web Module(application).

and that’s it !!

Why to take the direct access to glassfish rather then apache >> galssfish … simply it’s much more faster.
and glassfish cash just works fine.

If you think something is wrong please feel free to comment :)

Leave a reply.