Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a couple servers running Apache 2.2 and Weblogic instances at work. I am wondering if Apache with mod_proxy or mod_weblogic can do backend health checking with focus on response times? Can Apache 2.2 switch to another instance when response times are high on some backend?

I guess the best way is using Varnish or Apache Traffic Server but as for now we try looking into Apache 2.2.

share|improve this question
add comment

1 Answer

The mod_proxy_balancer has such a funcionality and it can mark a backend server as unresponsive.

This configuration makes sessions "sticky" to a server and switch to the second one if it becomes unresponsive (but I am not sure if it applies to your specific situation).

 <Proxy balancer://mybalancer>
  Header add Set-Cookie "Node=prefer.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
  BalancerMember http://server1/ route=server1
  BalancerMember http://server2/ route=server2
 </Proxy>
 ProxyPass / balancer://mybalancer stickysession=Node nofailover=Off
 ProxyPassReverse / http://server1/
 ProxyPassReverse / http://server2/
share|improve this answer
    
Thanks, that is the setup we are using now, what is the algorithm based on actually "BALANCER_WORKER_ROUTE"? Is it possible to use an algorithm with response time? –  user55483 Oct 18 '10 at 7:14
    
BALANCER_WORKER_ROUTE is not an algorithm, but an environment variable: it "is assigned the route of the worker that will be used for the current request" (taken from the apache manual). It makes the connection "sticky". IMHO it is not possible to use a "response time" algorithm. –  marcoc Oct 26 '10 at 14:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.