Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Maxim Dounin
March 01, 2017 07:00PM
Hello!

On Wed, Mar 01, 2017 at 12:16:39PM -0800, Piotr Sikora via nginx-devel wrote:

> Hi Maxim,
>
> > Not sure it's good idea to don't count a 429 response as a peer
> > failure. Contrary, counting it as a failure will naturally reduce
> > load on the particular server, resulting in less rejects.
>
> But 429 can be returned on a per request basis (think client IP
> exceeding limit_req limits, or a logged in user that's rate-limited
> based on API usage), so I'd question marking backends as failed
> because of that.

Sure, but why one would use "proxy_next_upstream http_429" then?

If one of your backends reject a requests based on client's IP /
login, then you probably don't want nginx to retry such a request
on other servers, as this will just allow the user to do more
requests when you already know the limit was reached. And it
doesn't look like an effective way to build a system with
distributed limits.

In contrast, if a limit affects nginx's IP and/or group of
services on a backend, retrying on a different backend may make
sense. But use case suggests that 429 should be counted as
failure.

Note well that right now only 404 and 403 are not counted as
failures, and these are done for a very specific use case: when
only some of your backends have relevant resources available, and
404 is just used a signal to try other backends. And 403 is mostly
the same, but will appear when syncing new directories to a
backend server.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Piotr Sikora 988 October 19, 2016 03:54AM

[PATCH 2 of 2] HTTP: change default response code when rate-limiting requests

Piotr Sikora 303 October 19, 2016 03:54AM

Re: [PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Piotr Sikora via nginx-devel 286 November 29, 2016 08:10PM

Re: [PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Piotr Sikora via nginx-devel 380 January 20, 2017 08:04PM

Re: [PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Piotr Sikora via nginx-devel 231 February 22, 2017 10:40PM

Re: [PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Maxim Dounin 237 February 25, 2017 06:46PM

[PATCH 1 of 3] HTTP: add support for "429 Too Many Requests" response (RFC6585)

Piotr Sikora via nginx-devel 586 February 28, 2017 06:42PM

[PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Piotr Sikora via nginx-devel 287 February 28, 2017 06:42PM

Re: [PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Maxim Dounin 231 March 01, 2017 10:34AM

Re: [PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Piotr Sikora via nginx-devel 226 March 01, 2017 03:18PM

Re: [PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Maxim Dounin 241 March 01, 2017 07:00PM

Re: [PATCH 2 of 3] Upstream: allow recovery from "429 Too Many Requests" response

Piotr Sikora via nginx-devel 239 March 24, 2017 06:50AM

[PATCH 3 of 3] Limit req: change default response code when rate-limiting

Piotr Sikora via nginx-devel 218 February 28, 2017 06:42PM

Re: [PATCH 3 of 3] Limit req: change default response code when rate-limiting

Maxim Dounin 226 March 01, 2017 10:40AM

Re: [PATCH 3 of 3] Limit req: change default response code when rate-limiting

Piotr Sikora via nginx-devel 217 March 01, 2017 03:22PM

Re: [PATCH 3 of 3] Limit req: change default response code when rate-limiting

Maxim Dounin 252 March 01, 2017 07:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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