Welcome! Log In Create A New Profile

Advanced

Re: Maximum number of backends to try

Maxim Dounin
April 06, 2010 04:28AM
Hello!

On Mon, Apr 05, 2010 at 09:46:52PM -0400, bryndole wrote:

> The only such patch I could find was this:
> http://openhack.ru/nginx-patched/
>
> Which only works with the memcached_gzip plugin of which it is a
> part.

For me, 1st google result points to author's site (catap.ru) with
the patch posted alone.

http://www.google.com/search?hl=en&q=upstream_count_limit
http://catap.ru/patches/nginx/ngx_http_upstream_count_limit-0.3.patch

Your google may vary though.

> I too would find this feature extremely helpful. Preventing the
> situation where some request takes just a bit too long and times
> out on server or generates the "wrong" type of error and nginx
> tries upstream server after upstream server, without bound.
>
> Any other suggestions? Is anyone working on a simpler patch?

Usually people just disable proxy_next_upstream (or limit it to
something like "error") and use error_page based fallback instead.
E.g.

upstream backend {
# many servers here
}

location / {
proxy_pass http://backend;
error_page 502 504 = @fallback;
}

location @fallback {
proxy_pass http://backend;
}

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Maximum number of backends to try

Avleen Vig March 29, 2010 09:44AM

Re: Maximum number of backends to try

Maxim Dounin March 29, 2010 01:04PM

Re: Maximum number of backends to try

bryndole April 05, 2010 09:46PM

Re: Maximum number of backends to try

Maxim Dounin April 06, 2010 04:28AM

Re: Maximum number of backends to try

bryndole April 06, 2010 06:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
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