comparison src/http/ngx_http_upstream.h @ 6966:fa56ab75cffc

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>
author Piotr Sikora <piotrsikora@google.com>
date Fri, 24 Mar 2017 02:48:03 -0700
parents 1aeaae6e9446
children 5a3ab1b5804b
comparison
equal deleted inserted replaced
6965:3ef4cadfad7f 6966:fa56ab75cffc
24 #define NGX_HTTP_UPSTREAM_FT_HTTP_502 0x00000020 24 #define NGX_HTTP_UPSTREAM_FT_HTTP_502 0x00000020
25 #define NGX_HTTP_UPSTREAM_FT_HTTP_503 0x00000040 25 #define NGX_HTTP_UPSTREAM_FT_HTTP_503 0x00000040
26 #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080 26 #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080
27 #define NGX_HTTP_UPSTREAM_FT_HTTP_403 0x00000100 27 #define NGX_HTTP_UPSTREAM_FT_HTTP_403 0x00000100
28 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000200 28 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000200
29 #define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000400 29 #define NGX_HTTP_UPSTREAM_FT_HTTP_429 0x00000400
30 #define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00000800 30 #define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000800
31 #define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00001000 31 #define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00001000
32 #define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00002000 32 #define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00002000
33 #define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00004000
33 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000 34 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000
34 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 35 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000
35 36
36 #define NGX_HTTP_UPSTREAM_FT_STATUS (NGX_HTTP_UPSTREAM_FT_HTTP_500 \ 37 #define NGX_HTTP_UPSTREAM_FT_STATUS (NGX_HTTP_UPSTREAM_FT_HTTP_500 \
37 |NGX_HTTP_UPSTREAM_FT_HTTP_502 \ 38 |NGX_HTTP_UPSTREAM_FT_HTTP_502 \
38 |NGX_HTTP_UPSTREAM_FT_HTTP_503 \ 39 |NGX_HTTP_UPSTREAM_FT_HTTP_503 \
39 |NGX_HTTP_UPSTREAM_FT_HTTP_504 \ 40 |NGX_HTTP_UPSTREAM_FT_HTTP_504 \
40 |NGX_HTTP_UPSTREAM_FT_HTTP_403 \ 41 |NGX_HTTP_UPSTREAM_FT_HTTP_403 \
41 |NGX_HTTP_UPSTREAM_FT_HTTP_404) 42 |NGX_HTTP_UPSTREAM_FT_HTTP_404 \
43 |NGX_HTTP_UPSTREAM_FT_HTTP_429)
42 44
43 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 45 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40
44 46
45 47
46 #define NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT 0x00000002 48 #define NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT 0x00000002