Regarding keepalive and idempotency
mdounin at mdounin.ru
Tue Jan 7 02:22:44 UTC 2014
On Sat, Jan 04, 2014 at 05:14:51PM +0530, Fasih wrote:
> Hi guys
> Hello guys
> Nginx keepalive seems to retry automatically on failure. However for
> non-idempotent requests, it is incorrect by RFC to retry automatically
> because the server could have changed its state before nginx detected the
> Is this a bug that would be fixed or did I not get it right?
As of now, keepalive connection retries aren't aware of
idempotence, much like proxy_next_upstream. Retries are only done
in case of early errors though, and this is expected to be good
enought in most cases.
The future plan is to teach proxy_next_upstream and friends about
idempotent or not idempotent methods, and probably also splitting
"error" state into errors before we were theoretically able to
send at least some bytes of the request (that is, retries are for
sure safe even in case of non-idempotent methods), and errors
after that point.
More information about the nginx-devel