Hi guys

I would like to accomplish to following with HAProxy : if a server show
a load average too high, indicate this server as down and remove it from
live traffic. When load avg get to a better state, put server back
online.

Looking into documentation I think the following could work, I would
like to have your opinion.

1. create a PHP script that will check actual server status (we need to
ensure load average is not too high, maybe other checks would be acheive
also). According to the value we consider "bad", change current HTTP
status to something like 5xx.

2. Configure HAProxy to check on that page like this :
option httpchk HEAD /check-status.php HTTP/1.0

Does that make sense ? Is there other method of checking health of
server according to its current load average ?

We are running high traffic sites, we are also wondering if this would
be more efficient to use 

http-check disable-on-404
or
http-check expect

instead.

We think of not using an y regex pattern would be better for our
situation.

Thanks and have a nice day

-- 
Maxime Ducharme
Systems Architect




Reply via email to