Welcome! Log In Create A New Profile


proxy_cache_lock_age vs proxy_cache_lock_timeout

Posted by Thijssss 
proxy_cache_lock_age vs proxy_cache_lock_timeout
August 27, 2019 05:20AM

The proxy_cache_lock feature is nice to protect the backend server from being overloaded with requests.
So we set that on and configure proxy_cache_lock_age to 20s, expecting the backend to be able to reply and send the request within that timeframe.

By default the proxy_cache_lock_age is 5s
By default the proxy_cache_lock_timeout is 5s

With the age set to 20s, we expect requests to be queued for 20 seconds while it tries to get and cache the file from the backend. If this does not succeed within 20 seconds it will send one new request to try again and make everybody wait 20+ seconds.
If the backend cannot satisfy within 20 seconds, why would we use the proxy_cache_lock_timeout? That would flood the backend and not even cache the responses.

Does proxy_cache_lock_timeout only work for Byte-Range requests?
Does setting proxy_cache_lock_timeout to 0s disable it?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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