> But when A is not available, it should send request to B. > When A come back, it should send requests to A. You can add 'backup' for the B server and it will be used only when all others (A) are down: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#server rr