server {
...
location / {
proxy_pass http://backend_1;
}
}
Sometimes I have to restart my backend and it is unavailable for 3-5sec (port unreachable)
How I can tell nginx to "wait" for backend and do not respond with 502 ?
So it should hold connection for 5 second and if it is unreachable in that interval responds 502 to client.