Thank you Willy, that will do it if you say however I had the impression that HAproxy by default won't use backend that is currently down. For that a new session (redirect) always gets backend that is online unless all are down in which case error page is something very much acceptable.
If I place custom error page on another server and it goes down user won't see it anyway. Also, why show error page if there are other available backends to serve request. Sticky sessions won't work of course but this is acceptable at least for me. That's what I try to achieve. Kind regards, Hristo -----Original Message----- From: Willy Tarreau [mailto:[email protected]] Sent: Sunday, June 27, 2010 10:03 PM To: Христо Красимиров Григоров Cc: [email protected] Subject: Re: Use of errorloc303 On Sun, Jun 27, 2010 at 08:46:59PM +0300, [email protected] wrote: > > May be I am using this option for wrong purpose but it works nicely when at > least one backend is available. User is auto-redirected withount any boring > error pages. Problem happens only when all backends are down. I understand how you use it, but if you absolutely want to use it that way, then you should ensure that your frontend contains a rule which prevents the use of the faulty backend once it's down. For instance : frontend pub use_backend all_down if { nbsrv(bk_www) lt 1 } default_backend bk_www backend bk_www errorloc303 xxx server s1 ... server s2 ... server s3 ... backend all_down # no errorloc, no server, the user will get a plain 503. # Alternatively, an errorfile might be used to return # something cleaner. Regards, Willy

