I've got a situation with haproxy 1.5.x I'm trying to understand better. In my 
situation, several Apache httpd servers sit behind haproxy and behind that are 
the actual application servers. httpd is using mod-jk to load balance all the 
applications to all the web servers. So if the application server returns a 500 
error, apache httpd will pass that through to haproxy and then to the end user.

So far, all good. But I don't want haproxy to then remove that server from the 
pool. The 500 error could have been from a single application server, and we 
don't want to it lock out since it is already load balanced behind all the 
httpd servers. We will end up locking out one of the httpd server which really 
wasn't at fault.

So my question:

1. Will haproxy remove a server from its backend pool if it returns a 500 
response to a request (I'm not talking about the health check, but just a 
regular request)

2. Can haproxy be instructed to ignore 500 errors for its health check (I still 
want to detect that the server has gone away and doesn't respond, but the 500 
error might be transient or it might just be on one page due to 
misconfiguration and doesn't warrant removing the whole server).


I think in the long term I'd like to remove the httpd layer to my setup, but 
for now it performs important mod_rewrite work that I can't easily replace. 
Once removed, haproxy will be exposed directly to the application servers and 
can be cleverer about removing them from the pool if they die.

Am I right in guessing that question (2) might be solved by the new features in 
haproxy 1.6?

Thanks
Ari



-- 
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to