Welcome! Log In Create A New Profile

Advanced

Re: proxy_ignore_client_abort with cache

Maxim Dounin
June 19, 2019 02:10PM
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/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_ignore_client_abort with cache

Roger Fischer June 19, 2019 01:40PM

Re: proxy_ignore_client_abort with cache

Maxim Dounin June 19, 2019 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 297
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready