<div dir="ltr"><div><div><div>looks like something what I'm looking for!<br></div>thanks a lot, starting my tests<br><br></div>br<br></div>L.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Łukasz Tasz<br></div><div>RTKW<br></div></div></div></div>
<br><div class="gmail_quote">2016-09-01 15:31 GMT+02:00 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Thu, Sep 01, 2016 at 01:34:39PM +0200, Łukasz Tasz wrote:<br>
<br>
> Hi all,<br>
> since some time I'm using nginx as reverse proxy with caching for serving<br>
> images files.<br>
> looks pretty good since proxy is located per each location.<br>
><br>
> but I noticed problematic behaviour, when cache is empty, and there will<br>
> pop-up a lot of requests at the same time, nginx don't understand that all<br>
> request are same, and will fetch from upstream only onece and serve it to<br>
> the rest, but all requests are handovered to upstream.<br>
> side effects?<br>
> - upstream server limit rate since there is to much connections to one<br>
> client,<br>
> - in some cases there are issues with temp - not enough space to finish all<br>
> requests<br>
><br>
> any ideas?<br>
> is it known problem?<br>
><br>
> I know that problem can be solved with warming up caches, but since there<br>
> is a lot of locations, I would like to keep it transparent.<br>
<br>
</span>There is the proxy_cache_lock directive to address such use cases,<br>
see <a href="http://nginx.org/r/proxy_cache_lock" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_<wbr>cache_lock</a>.<br>
<br>
Additionally, for updating cache items there is<br>
"proxy_cache_use_stale updating", see<br>
<a href="http://nginx.org/r/proxy_cache_use_stale" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_<wbr>cache_use_stale</a>.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a></font></span></blockquote></div><br></div>