Our nginx reverse proxy creates a temporary entry in the proxy_temp
directory if that file does not yet exists in the cache. So far so good
if the file does not exists and the file will be requested 10 times at
same time it creates 10 temporary files in the proxy_temp and fetches
data 10 times from the proxied server. The result is high write IO and
bandwidth for a single file.
I already tested “proxy_cache_lock on” and played with the directive
“proxy_cache_lock_timeout” which addresses the issue. The disadvantage
that 1 connection will get the data but 9 are delayed because of the
The optimal solution would be if all the 10 hypothetic connections will
served from the same temporary cache file out of the proxy_temp.
Is there a good/better approach to solve this scenario?
Posted at Nginx Forum: