Welcome! Log In Create A New Profile

Advanced

input required on proxy_next_upstream

February 15, 2017 12:18PM
Hi,

We are using nginx as reverse proxy and have a set of upstream servers
configured
with upstream next enabled for few error conditions to try next upstream
server.
For some reason this is not working. Can someone suggest if am missing
something?

http {
....
upstream myservice {
server localhost:8081;
server localhost:8082;
}

server {
...
location / {
proxy_pass http://myservice;
proxy_next_upstream error timeout invalid_header http_502 http_503
http_504;
}
}
}

So what i want is if any upstream server gives the above errors, it should
try
the next upstream instance, but it does not and just reports error to
clients.

Note that, in my case one of the upstream server responds early for some
PUT request with 503 before entire request is read by upstream. I
understand that nginx closes the current upstream connection where it
received early response, but i expect it to try the next upstream server as
configured for the same request before it responds with error to client.

Am I missing some nginx trick here?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

input required on proxy_next_upstream

kaustubh February 15, 2017 12:18PM

Re: input required on proxy_next_upstream

kaustubh February 17, 2017 09:10AM

Re: input required on proxy_next_upstream

Igor A. Ippolitov February 17, 2017 04:12PM

Re: input required on proxy_next_upstream

kaustubh February 17, 2017 11:29PM

Re: input required on proxy_next_upstream

Francis Daly February 18, 2017 05:46AM

Re: input required on proxy_next_upstream

kaustubh February 21, 2017 04:45AM

Re: input required on proxy_next_upstream

Francis Daly February 21, 2017 03:20PM

Re: input required on proxy_next_upstream

kaustubh February 22, 2017 11:55AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready