Hi.
The problem is how to silent switch to another backend in realtime if
got 500 answer from backend, without http_client knowledge
Yes i know, httpchk, but the error 500 is 10 per hour, we don't know
when and why.
So, it is a race who get 500 first - httpchk or http_client.
If You don't know what i mean:
example config:
----8<--------
frontend
(..)
default_backend back_1
backend back_1
option httpchk GET /index.php HTTP/1.1\r\nHost:\ test.pl
mode http
retries 10
balance roundrobin
server chk1 127.0.0.1:81 weight 1 check
server chk2 127.0.0.1:82 weight 1 check
server chk3 127.0.0.1:83 weight 1 check backup
---->8----------
http_client -> haproxy -> (backend1|backend2|backend3)
let's go inside request:
A. haproxy recived request from http_client
B. haproxy sent request from http_client to backend1
C. backend1 said 500 internal server error
I want: :-)
D. haproxy sent request from_http to backend2 (or backup backend or
another one, or one more time to backend1)
I have: :-(
D. haproxy sent 500 internal server error to http_client from backend1
E. haproxy will mark backend1 as down if got 2 > errror 500 from backend1
It is possible to do that?
Thank You
/Dawid Sieradzki