Hi Jason Bronnx.
Jason Bronnx have written on Wed, 10 May 2017 20:58:56 -0700:
> Hi,
>
> Tried to search on this for a couple of hours, but had no luck,
> hoping you guys can help.
>
> I have a use case, that I need to try the request on backend-A first,
> then if returns 200, then it'll query backend-B and return that
> result. If it returns != 200, just return 404. Something like this:
>
> function pseudoCode() {
> if (backend-a.process() == 200) {
> return backend-b.process()
> }
>
> // Got a non-200 from backend-a, just return 404
> return 404
> }
>
> Is there a straightforward way of doing this in haproxy?
I assume you can do this with lua.
http://www.haproxy.org/#docs
http://www.arpalert.org/haproxy-lua.html
> Thanks!
> Jason
Best regards
Aleks