Welcome! Log In Create A New Profile

Advanced

Re: nginx caching proxy

Roman Arutyunyan
October 17, 2018 07:26AM
Hello,

On Wed, Oct 17, 2018 at 05:13:15AM -0400, drookie wrote:
> Hello,
>
> I did't find the answer in documentation, but am I right, assuming from my
> observation, that when the proxy_cache is enabled for a location, and the
> client requests the file that isn't in the cache yet, nginx starts
> transmitting this file only after it's fully received from the upstream ?
> Because I'm seeing the lags equal to the request_time from the upstream.

The short answer is no, nginx cache does not introduce any delays here.
Maybe your client waits until it receives the full file before letting you know.

When a client requests a file missing in the cache, then the file is requested
from the upstream and it is sent to the client SIMULTANEOUSLY with saving it
in the cache. However if another client requests a file currently being
received and cached in the first client's context, and proxy_cache_lock is
enabled, then this second client will wait for the file to be fully cached by
nginx and only receives it from the cache after that.

[..]

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx caching proxy

drookie October 17, 2018 05:13AM

Re: nginx caching proxy

Roman Arutyunyan October 17, 2018 07:26AM

Re: nginx caching proxy

vizl October 25, 2018 07:21AM

Re: nginx caching proxy

Roman Arutyunyan October 25, 2018 09:22AM

Re: nginx caching proxy

Gryzli Bugbear October 25, 2018 12:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
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