<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Check this one, pls :)<div><a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_lock">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_lock</a></div><div><br><div><div>On Jan 12, 2012, at 1:32 PM, Anatoli Marinov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div bgcolor="#ffffff" text="#000000">
<style type="text/css">p { margin-bottom: 0.08in; }</style><p style="margin-bottom: 0in;">Hello Colleagues,
</p><p style="margin-bottom: 0in;">I found a performance issue with
proxy_cache module.
</p><div style="margin-bottom: 0in; ">
<br class="webkit-block-placeholder"></div><p style="margin-bottom: 0in;">For example I have installed 2 servers
with nginx-1.0.10. First one(A) works as a reverse proxy and the second
one(B) is a storage with many big files – 1GB – 2GB. </p><p style="margin-bottom: 0in;">The link between A and B for example
may serve 1 MBps.
</p><div style="margin-bottom: 0in; ">
<br class="webkit-block-placeholder"></div><p style="margin-bottom: 0in;">There is a new object on B and it is
not yet cached on A.
</p><p style="margin-bottom: 0in;">Let we assume this is a hot new object
and A receives 1000 requests for 3 seconds for it. Because the object
is not cached the requests will pass through upstream to B and
incoming 1000 streams will be saved on A in tmp directory as a
separate files. After every request has completed the files from tmp
directory will be moved to cache directory. 1000 equal operations for
one and the same object. In addition every object will be cached
slow because there are 999 other streams. </p><div style="margin-bottom: 0in; ">
<br class="webkit-block-placeholder"></div><p style="margin-bottom: 0in;">This 1 GB object will be downloaded
1000 times before it may be cached and this is not optimal at all.
</p><div style="margin-bottom: 0in; ">
<br class="webkit-block-placeholder"></div><p style="margin-bottom: 0in;">Am I missing something? It may be my
configuration issue?
</p><p style="margin-bottom: 0in;">Is there a solution for that?<br>
</p><p style="margin-bottom: 0in;">Cheers<br>
Anatoli Marinov<br>
</p>
</div>
_______________________________________________<br>nginx-devel mailing list<br><a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>http://mailman.nginx.org/mailman/listinfo/nginx-devel</blockquote></div><br></div></body></html>