Welcome! Log In Create A New Profile

Advanced

RE: STALE responses taking as much as MISS responses

All files from this thread

File Name File Size   Posted by Date  
badge-and-logo.png 10.4 KB open | download Joan Tomàs i Buliart 02/12/2019 Read message
Reinis Rozitis
February 11, 2019 02:52PM
> On my logs I can see that HIT's are very fast but STALEs take as much as MISS
> while I believe they should take as much as HITs.
>
> Is there something I can do to improve this ? Are the stale responses a true
> "stale-while-revalidate" response ?or are they waiting for the response from the
> origin server ?

IMO the stale responses can't be as fast as HIT even theoretically (except maybe in 'updating' state with proxy_cache_background_update enabled) since they happen when the cache object has expired and nginx tries to get a new version from backend but for some reason can't get an updated response from the upstream (all the proxy_cache_use_stale states).

I would try to identify why the stales actually happen - is it because the backend fails or there are multiple parallel requests to the same url and something like proxy_cache_lock is also defined.

To speed up the response you might want to check the proxy_*_timeout directives as the defaults are quite high (60sec) and for example proxy_read_timeout is between reads so depending on the object size in case of a slow backend might take even more time.

rr

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

STALE responses taking as much as MISS responses

joao.pereira February 11, 2019 09:59AM

Re: STALE responses taking as much as MISS responses

joao.pereira February 11, 2019 10:06AM

Re: STALE responses taking as much as MISS responses

Peter Booth via nginx February 11, 2019 02:02PM

Re: STALE responses taking as much as MISS responses

Peter Booth via nginx February 11, 2019 02:28PM

Re: STALE responses taking as much as MISS responses

joao.pereira February 12, 2019 05:54AM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 12, 2019 07:08AM

Re: STALE responses taking as much as MISS responses Attachments

Joan Tomàs i Buliart February 12, 2019 01:32PM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 12, 2019 03:10PM

Re: RE: STALE responses taking as much as MISS responses

joao.pereira February 15, 2019 12:54PM

Re: RE: STALE responses taking as much as MISS responses

Maxim Dounin February 18, 2019 07:46AM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 11, 2019 02:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 121
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready