Load Balancing, no fail over when backend server is down?

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

 



Greetings

I have recently setup Apache load balancing to two backend JBoss
(5.1.0.GA) servers. Communication over AJP, with Sticky Sessions, (no
session replication on the Jboss servers). I'm having a problem with
both Apache 2.2.21 (SUSE 11.3) and 2.4.1 (CentOS 5-something, I
think).

I shut off one of the jboss nodes, the balancer-manager page shows
that node's status as Err, yet Apache is still forwarding requests to
that server, which results in a 503.

Now, I'm making some assumptions here, but they seem pretty reasonable
to me - if one of the nodes is in error status, I assume Apache would
not send requests to it, even with Sticky Sessions. If I leave my
cookies as is (with the jvmRoute to the node that is down), I get a
503 page, which is extremely not useful, and contrary to one of the
main reasons we put in the second JBoss server.

In order to get Apache to send requests to the server that is
available, I have to either delete/modify the browser cookie, or set
the node status to disabled. We have monitoring in place for the
balancer-manager page, to alert me if the status of a node changes so
I can set it to disabled if I need to, but it seems like Apache should
not be sending traffic, even sticky traffic, to down nodes.

But what I want is that if the node is down that all requests would go
to the up node, sticky sessions be damned. If the user's session is
broken/reset in the server switch, that is a small thing compared to
getting a 503 page, making them think the site is down.

Can someone please tell me what am I doing wrong?

<Proxy balancer://jbcluster>
  BalancerMember ajp://jbtest1:8009 route=tn1 retry=0 loadfactor=1
  BalancerMember ajp://jbtest2:8009 route=tn2 retry=0 loadfactor=1
  ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
scolonpathdelim=On nofailover=Off
</Proxy>

ProxyPass /images !
ProxyPass /apache-info !
ProxyPass /apache-status !
ProxyPass /balancer-manager !

ProxyPassMatch ^(/|/cl/.*|/s/.*|/c/.*|/d/.*|/m/.*|/v/.*|/t/.*|/p/.*|/b/.*|/tw/.*)$
balancer://jbcluster

ProxyPassMatch (\.do.*|\.jsp)$ balancer://jbcluster

ProxyPassMatch (.*/styles/.*\.css|/scripts/.*\.js|/pie/PIE.htc)$
balancer://jbcluster

thanks
ryan

---------------------------------------------------------------------
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