Welcome! Log In Create A New Profile

Advanced

Wait for backend

June 27, 2018 05:57AM
Hi

I have one backend:

upstream backend_1 {
server 127.0.0.1:35510;
}

and server:

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.

Thanks
Subject Author Posted

Wait for backend

duda June 27, 2018 05:57AM

Re: Wait for backend

cacrus June 27, 2018 08:04AM

Re: Wait for backend

duda June 28, 2018 08:14AM

Re: Wait for backend

duda June 28, 2018 08:15AM

Re: Wait for backend

Richard Stanway July 02, 2018 12:20PM

Re: Wait for backend

duda July 02, 2018 12:53PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready