Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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] [2] [3] [4] -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


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.