]> git.kaiwu.me - haproxy.git/commit
[MEDIUM] implement "http-check disable-on-404" for graceful shutdown
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Nov 2007 09:41:39 +0000 (10:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Nov 2007 09:41:39 +0000 (10:41 +0100)
commit48494c0c5c4d08492522aa00296143c6b6a72943
tree50d9a9e7e1fcf0fc34204268f89c011a010ab282
parentc7dd71ae5b74f22d0d4d6634faa226882db829f5
[MEDIUM] implement "http-check disable-on-404" for graceful shutdown

When an HTTP server returns "404 not found", it indicates that at least
part of it is still running. For this reason, it can be convenient for
application administrators to be able to consider code 404 as valid,
but for a server which does not want to participate to load balancing
anymore. This is useful to seamlessly exclude a server from a farm
without acting on the load balancer. For instance, let's consider that
haproxy checks for the "/alive" file. To enable load balancing on a
server, the admin would simply do :

  # touch /var/www/alive

And to disable the server, he would simply do :

  # rm /var/www/alive

Another immediate gain from doing this is that it is now possible to
send NOTICE messages instead of ALERT messages when a server is first
disable, then goes down. This provides a graceful shutdown method.

To enable this behaviour, specify "http-check disable-on-404" in the
backend.
include/types/proxy.h
include/types/server.h
src/backend.c
src/cfgparse.c
src/checks.c