Balancer logic on a per-context basis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

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
scolonpathdelim=On
</Proxy>

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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux