diff options
| author | Piotr Sikora <piotrsikora@google.com> | 2017-03-24 02:48:03 -0700 |
|---|---|---|
| committer | Piotr Sikora <piotrsikora@google.com> | 2017-03-24 02:48:03 -0700 |
| commit | ca1a5057e2a0429350ec2d07c4616a75e34424e3 (patch) | |
| tree | 1f541379013606a8dc6505a26f3ca8710de085e2 /src/http/ngx_http_upstream.h | |
| parent | c3ce606652aeac465895ab8eb8c6fc195d7db16b (diff) | |
| download | nginx-ca1a5057e2a0429350ec2d07c4616a75e34424e3.tar.gz nginx-ca1a5057e2a0429350ec2d07c4616a75e34424e3.tar.bz2 | |
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>
Diffstat (limited to 'src/http/ngx_http_upstream.h')
| -rw-r--r-- | src/http/ngx_http_upstream.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h index 625889b6a..c552ac0c6 100644 --- a/src/http/ngx_http_upstream.h +++ b/src/http/ngx_http_upstream.h @@ -26,10 +26,11 @@ #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080 #define NGX_HTTP_UPSTREAM_FT_HTTP_403 0x00000100 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000200 -#define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000400 -#define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00000800 -#define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00001000 -#define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00002000 +#define NGX_HTTP_UPSTREAM_FT_HTTP_429 0x00000400 +#define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000800 +#define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00001000 +#define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00002000 +#define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00004000 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 @@ -38,7 +39,8 @@ |NGX_HTTP_UPSTREAM_FT_HTTP_503 \ |NGX_HTTP_UPSTREAM_FT_HTTP_504 \ |NGX_HTTP_UPSTREAM_FT_HTTP_403 \ - |NGX_HTTP_UPSTREAM_FT_HTTP_404) + |NGX_HTTP_UPSTREAM_FT_HTTP_404 \ + |NGX_HTTP_UPSTREAM_FT_HTTP_429) #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 |
