httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [users@httpd] Balancer logic on a per-context basis
Date Thu, 31 May 2012 15:49:34 GMT


I have a couple apache http servers (v2.2) proxying requests to a handful
of tomcat servers (6.x) serving applications in individual contexts.  I
have a ProxyPass line for each context in my config.  I'm utilizing the
proxy balancer and its working well; if I kill "tomcat1", apache will quit
sending requests to it as expected.  However, if I stop a context (to
simulate a crashed app) and leave tomcat running, apache seems to consider
the balancer member alive.  Obviously, this results in "unavailable"
responses from Tomcat to the end user.

I realize there are multiple technologies at work here (apache balancer,
AJP, and tomcat).  Is it possible to configure apache to check each context
listed with a ProxyPass directive for availability, and execute logic based
on that (e.g. remove the balancer_member, or select another balancer_member
for requests to that ProxyPass item)?

Based on my reading of the documentation and archives, it appears the
balancer is concerned with connectivity to the http/ajp connector of the
back-end server, which makes sense.  I understand HTTP isn't designed to do
what I'm asking, but I'm hoping there is some special functionality in AJP
that could allow the aforementioned to be possible.

Thanks for any input.

--- httpd Configuration Snippet ---
<Proxy balancer://some-balancer>
  BalancerMember ajp://tntest-app-a-1:8009 loadfactor=1 route=tomcat1
  BalancerMember ajp://tntest-app-a-2:8009 loadfactor=1 route=tomcat2
  ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid

ProxyPass /testApp  balancer://some-balancer/testApp
ProxyPass /anotherApp  balancer://some-balancer/anotherApp

--- System Info ---
OS: Ubuntu 10.04 LTS
Apache httpd: 2.2.14 (Ubuntu)
Tomcat: 6.0.24
AJP Protocol version 1.3

Kyle Harper

This communication and any attachments are confidential, protected by Communications Privacy
Act 18 USCS  2510, solely for the use of the intended recipient, and may contain legally
privileged material. If you are not the intended recipient, please return or destroy it immediately.
Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message