You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by rjowens <rj...@us.ibm.com> on 2010/07/28 00:14:58 UTC
Apache Http Server Load Balancing and Failover
I have Apache Http Server v2.2.3 configured as a reverse proxy with load
balancing to a WADI clustered application on Geronimo 2.1.5. Load balancing
and failover works fine if one of the Geronimo instances fail. However, if
only the application fails or is stopped I get a 404 error and failover does
not work?
Here’s the LB config:
<IfModule mod_proxy_balancer.c>
<Proxy balancer://wadicluster>
Order deny,allow
Allow from all
BalancerMember ajp://localhost:8209/NodeDetection loadfactor=50
route=node1
BalancerMember ajp://localhost:8409/NodeDetection loadfactor=50
route=node2
</Proxy>
ProxyPass /NodeDetect balancer://wadicluster stickysession=JSESSIONID
ProxyPassReverse /NodeDetect ajp://localhost:8209/NodeDetect
ProxyPassReverse /NodeDetect ajp://localhost:8409/NodeDetect
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
</Location>
</IfModule>
I need to make this work with an application failure as well as a server
failure. Any ideas? Thanks.
--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Apache-Http-Server-Load-Balancing-and-Failover-tp1000886p1000886.html
Sent from the Users mailing list archive at Nabble.com.
Re: Apache Http Server Load Balancing and Failover
Posted by Trygve Sanne Hardersen <tr...@hypobytes.com>.
What if someone requests a missing page while your app is still happy?
Should Apache then retry all servers?
I believe with HAProxy you can configure a repeated background response code
check for another URL, so that when this check returns an error response the
server is considered failed. This way you can stop the monitor app first,
and after a while stop the main app to provide graceful shutdown of the
service.
Not sure how to do this with Apache. For HAProxy info search for "option
httpchk" here:
http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
*By default, server health checks only consist in trying to establish a TCP
connection. When "option httpchk" is specified, a complete HTTP request is
sent once the TCP connection is established, and responses 2xx and 3xx are
considered valid, while all other ones indicate a server failure, including
the lack of any response.
The port and interval are specified in the server configuration.*
Trygve
On Wed, Jul 28, 2010 at 12:14 AM, rjowens <rj...@us.ibm.com> wrote:
>
> I have Apache Http Server v2.2.3 configured as a reverse proxy with load
> balancing to a WADI clustered application on Geronimo 2.1.5. Load
> balancing
> and failover works fine if one of the Geronimo instances fail. However, if
> only the application fails or is stopped I get a 404 error and failover
> does
> not work?
>
> Here’s the LB config:
>
> <IfModule mod_proxy_balancer.c>
> <Proxy balancer://wadicluster>
> Order deny,allow
> Allow from all
> BalancerMember ajp://localhost:8209/NodeDetection loadfactor=50
> route=node1
> BalancerMember ajp://localhost:8409/NodeDetection loadfactor=50
> route=node2
> </Proxy>
> ProxyPass /NodeDetect balancer://wadicluster stickysession=JSESSIONID
>
> ProxyPassReverse /NodeDetect ajp://localhost:8209/NodeDetect
> ProxyPassReverse /NodeDetect ajp://localhost:8409/NodeDetect
>
> <Location /balancer-manager>
> SetHandler balancer-manager
> Order Deny,Allow
> Allow from all
> </Location>
>
> </IfModule>
>
> I need to make this work with an application failure as well as a server
> failure. Any ideas? Thanks.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Apache-Http-Server-Load-Balancing-and-Failover-tp1000886p1000886.html
> Sent from the Users mailing list archive at Nabble.com.