Hi Mates,
I have this below config, my requirement is to route the requests if main-backend’s available servers becomes 1 out of 2, so I tried nbsrv, but ended up with some problem there which is not working as expected
frontend myApplication
bind :::443 ssl crt <cert/location>
log global
maxconn 10000
acl main_is_down nbsrv(main-backend) le 1
use_backend backup-backend if main_is_down
default_backend main-backend
backend main-backend
option httpchk GET /healthCheck
server server1 1.2.3.4:8080 maxconn 100 check
server server2 1.2.3.5:8080 maxconn 100 check
backend backup-backend
option httpchk GET /healthCheck
server backup-server1 2.1.3.4:8080 maxconn 100 check
server backup-server2 2.1.3.5:8080 maxconn 100 check
All the servers in main-backend is down, request is getting failed with 503 since both the servers in main-backend is down
Could you please help in suggesting the changes in this config to make it work so that I can forward the requests to backup-backend ?
Thanks in Advance!
3 posts - 2 participants