Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am planning a large deployment of a Glassfish-powered web application:

  • A number of nodes running multiple Glassfish 3.1.1 instances are running the web application.
  • The web application consists of a GoogleWebToolkit frontend and a REST gateway.
  • The instances are combined behind an Apache 2.2 reverse proxy / loadbalancer.
  • All client communication (mobile app, browser and other web apps) is over HTTPS, SSL is terminated at the Apache loadbalancer.

What is the benefit of running communication between Apache and Glassfish over mod-jk / AJP13 compared to HTTP in terms of performance and availability?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

http proxy would open many connections between your balabcer and app server. mod_jk should be less resource hungry because AJP protocol handles many requests through a single connection.

Also with mod_jk should be easier to serve static contents through the apache httpd.

btw mod_cluster has advantages dealing with dynamically adding and removing servers but I don't see it tested with glassfish doing a quick search.

share|improve this answer
1  
What about HTTP keep-alive? –  Shane Madden Aug 25 '11 at 5:21
    
Although ajp is binary and should be faster good http tunning may eat the difference. By default mod_proxy does not use keep-alives[1]. Recommendations are to benchmark your particular application. In my experience with mod_proxy it was easier to setup wrt ssl and cookies paths. Also client IP is visible by server. See a link list below. [1] httpd.apache.org/docs/2.2/mod/mod_proxy.html [2] tomcat.apache.org/connectors-doc/ajp/ajpv13a.html [3] arstechnica.com/civis/viewtopic.php?f=16&t=98647 [4] tomcat.apache.org/connectors-doc/miscellaneous/faq.html -search for ajp –  akostadinov Sep 9 '11 at 8:32
    
My understanding is that mod_jk can ping the downstream instances independently to detect and handle backend failures before a user-request comes in. Need to see how high that ranks with performance. –  Hank Sep 13 '11 at 15:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.