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 10:34AM
Hello!

On Tue, Feb 28, 2017 at 03:40:00PM -0800, Piotr Sikora via nginx-devel wrote:

> # HG changeset patch
> # User Piotr Sikora <piotrsikora@google.com>
> # Date 1488324535 28800
> # Tue Feb 28 15:28:55 2017 -0800
> # Node ID e21f12a958010e1f3e5cdc1640859e335e032ca5
> # Parent 9a63d6e990d230db0ec6b03250265447f648526e
> Upstream: allow recovery from "429 Too Many Requests" response.
>
> This change adds "http_429" parameter to "proxy_next_upstream" for
> retrying rate-limited requests, and to "proxy_cache_use_stale" for
> serving stale cached responses after being rate-limited.
>
> Signed-off-by: Piotr Sikora <piotrsikora@google.com>

[...]

> @@ -4115,7 +4116,8 @@ ngx_http_upstream_next(ngx_http_request_
> if (u->peer.sockaddr) {
>
> if (ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_403
> - || ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_404)
> + || ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_404
> + || ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_429)
> {
> state = NGX_PEER_NEXT;
>

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.

--
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 991 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 287 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 381 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 587 February 28, 2017 06:42PM

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

Piotr Sikora via nginx-devel 288 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 242 March 01, 2017 07:00PM

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

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

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

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

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

Maxim Dounin 227 March 01, 2017 10:40AM

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

Piotr Sikora via nginx-devel 218 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: 195
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