Welcome! Log In Create A New Profile

Advanced

Re: limit proxy_next_upstream

All files from this thread

File Name File Size   Posted by Date  
96 bytes open | download Weibin Yao 04/05/2013 Read message
Weibin Yao
April 05, 2013 10:00AM
We have the similar request. If we have dozens of servers in a same
upstream block, I don't want to retry all of them. One side effect is it
will increase the failure count with all of the backend servers. After
several times, all of the servers will be marked down for a while and all
of the requests will be replied with 502.

We also need the retry mechnism and don't want to diable it. I think if
there is a configurable tries time with the direcitve proxy_next_upstream,
it will be very nice.


2013/4/5 Maxim Dounin <mdounin@mdounin.ru>

> Hello!
>
> On Fri, Apr 05, 2013 at 04:38:36AM -0400, philipp wrote:
>
> > Is it possible to limit the amount of upstreams asked? I have four
> upstreams
> > defined and it makes no sense to ask all of them. If two of them timeout
> or
> > error there is possible something wrong with the request and asking
> another
> > node doesn't help.
>
> No, as of now only switching off proxy_next_upstream completely is
> available.
>
> On the other hand, with switched of proxy_next_upstream you may
> still configure retries to additional (or other) upstream servers
> via error_page directive, using a configuration similar to last
> example at http://nginx.org/r/error_page.
>
> Something like this should generate no more than two requests
> regardless of number of upstream servers configured:
>
> location / {
> error_page 502 504 = @fallback;
> proxy_pass http://backend;
> proxy_next_upstream off;
> }
>
> location @fallback {
> proxy_pass http://backend;
> proxy_next_upstream off;
> }
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
Weibin Yao
Developer @ Server Platform Team of Taobao
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

limit proxy_next_upstream

philipp April 05, 2013 04:38AM

Re: limit proxy_next_upstream

Maxim Dounin April 05, 2013 06:14AM

Re: limit proxy_next_upstream

Weibin Yao April 05, 2013 10:00AM

Re: limit proxy_next_upstream

Maxim Dounin April 05, 2013 05:28PM

Re: limit proxy_next_upstream Attachments

Weibin Yao April 05, 2013 11:54PM

Re: limit proxy_next_upstream

Xeron January 14, 2014 09:55AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 198
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready