On Tue, Apr 02, 2013 at 08:55:13AM +0200, Baptiste wrote:
> Hi,
> 
> You can either use the disable-on-404 health checking option or using
> HAProxy socket to disable servers temporarly (I mean temporarly because the
> UNIX socket applies changes in running HAProxy process, not in its startup
> configuration file).
> You could then have a few simple acl matching the number of available
> servers in a farm (this also may mean you must have a backend by
> application).
> 
> use_backend maintenance_page if is_app1 nb_srv(bk_app1) eq 0
> use_backend bk_app1                if is_app1

I would even do something else : configure "errorfile 503" in each backend
to return the page you're talking about. Then just stop all servers from
the backend you want to put in maintenance (or even set their weight to 0)
and you'll see the error page being served.

Willy


Reply via email to