On Tue, Nov 10, 2015 at 4:53 PM, Aristedes Maniatis <[email protected]> wrote:
> 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) > Not by default but haproxy can monitor normal traffic and take action if desired. See the 'observe' and 'on-error' options. > > 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). > Probably, but if you don't care about the HTTP request or response, why not just use TCP health checks? -Bryan

