upstream 429 and non-idempotent request

Frank Liu gfrankliu at gmail.com
Thu Jun 8 16:55:05 UTC 2017


I fully understand the rationale of not retrying non-idempotent requests if
they are already sent, but in case of 429 (maybe other cases as well), I
don't see an issue of retrying even if request is sent. It would be better
if we can selectively do something like "proxy_next_upstream
non-idempotent-http_429;" or whatever http code that we know safe.

On Thu, Jun 8, 2017 at 8:20 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Thu, Jun 08, 2017 at 01:10:25AM -0700, Frank Liu wrote:
>
> > In case of upstream returning 429, I'd like to have nginx retry next
> > upstream server. Since nginx by default won't retry non-idempotent
> > requests, how do I force nginx to retry when receiving 429? I imagine
> this
> > should be the default behavior anyway, or does nginx not care about
> > returning code and will never retry non-idempotent?
>
> Non-idemportent requests are not retried as long as the request is
> already sent, regardless of a particular error.  If you want nginx
> to retry non-idempotent requests, you can do so with
> "proxy_next_upstream non-idempotent;", see
> http://nginx.org/r/proxy_next_upstream.
>
> --
> Maxim Dounin
> http://nginx.org/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170608/cc063809/attachment.html>


More information about the nginx mailing list