On 05/01/2015 12:04 μμ, Thomas Heil wrote: > Hi, > > On 03.01.2015 16:31, Ram Chander wrote: >> Hi, >> >> I have a requirement like below: >> >> Consider there are two sets of backends. Each has some servers in it >> One is default , other is backup >> Haproxy should try second set if first set returns 404. > > You mean all servers in the first backend return 404? If so, the option > "http-check disable-on-404" > is your best friend. > > I assume you have two backends "backend be_one" and "backend be_two". > > In the frontend section you need to declare an acl like > > -- > acl be_one_available nbsrv(be_one) ge 1 > > use_backend be_two if ! be_one_available > default_backend be_one > -- >
I suspect that Ram wants HAProxy to 'catch' 404 responses for normal traffic and not for a health-check response. Cheers, Pavlos
signature.asc
Description: OpenPGP digital signature