proxy_ignore_client_abort with cache
Maxim Dounin
mdounin at mdounin.ru
Wed Jun 19 18:08:21 UTC 2019
Hello!
On Wed, Jun 19, 2019 at 10:39:45AM -0700, Roger Fischer wrote:
> I am using NGINX (1.17.0) as a reverse proxy with cache. I want
> the cache to be updated even when the client closes the
> connection before the response is delivered to the client.
>
> Will setting proxy_ignore_client_abort to on do this?
When caching is enabled, nginx will ignore connection close by the
client regardless of the proxy_ignore_client_abort value, much
like with "proxy_ignore_client_abort on". Additionally, it will
ignore errors when sending the response to the client.
[...]
> The discussion referenced below implies that the upstream
> connection is still closed when nginx fails to send the response
> to the client.
Yes, with "proxy_ignore_client_abort on;" (and assuming
proxy_store/proxy_cache is not enabled).
> In the case of a range request, nginx will send the response
> once the requested range is available, and thus before the
> resource is completely downloaded.
> Therefore, this would imply that the resource will not be
> cached, regardless of the value of the proxy_ignore_client_abort
> directive.
> https://forum.nginx.org/read.php?2,253026,253029#msg-253029
You seems to assume that sending the range once it is available
implies that nginx will fail to send the response. This is not
true - the range filter simply skips unneeded data, and does not
generate any errors. Either way, this is completely unrelated to
caching - which explicitly ignores any errors even if they happen.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx
mailing list