Igor, thanks. <br><br><div class="gmail_quote">2009/5/12 Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, May 12, 2009 at 10:38:04AM +0200, J?r?me Loyet wrote:<br>
<br>
&gt; Hello igor,<br>
&gt;<br>
&gt; I have a question about the cache behaviour in proxy mode.<br>
&gt;<br>
&gt; I have nginx in front head which redirect to an apache back end. Nginx<br>
&gt; caches eveything for M minutes.<br>
&gt;<br>
&gt; If I have a large number of requests for the same page and this page<br>
&gt; is cached : nginx returns the cached page ... no problems<br>
&gt; After M minutes, the cached page expires<br>
&gt; The first request coming after the expiration makes nginx to ask the<br>
&gt; backend for refresh<br>
&gt; When nginx receives the backend fresh response, it&#39;s saved to cache<br>
&gt; and then nginx serves the fresh cached page<br>
&gt;<br>
&gt; But what happen between the start of the request to the backend and<br>
&gt; the end of the response from the backend ? (let&#39;s assume that the<br>
&gt; backend serves the page in 5s ... and in 5s I can have a lot of<br>
&gt; request to this page).:<br>
&gt; - Are the request queued waiting for the backend response ?<br>
&gt; - Every request makes try to refresh the cache from the backend ? (in<br>
&gt; this case, I have multiple request for the same page to the backend<br>
&gt; ... I can have a burst of request and my apache can be overflowed by<br>
&gt; request -- that&#39;s why I&#39;m using nignx with cache).<br>
&gt; - Do the requests serve the cached page even if it&#39;s expired until the<br>
&gt; backend response has been received ?<br>
&gt; - Maybe something else :)<br>
<br>
Currently all requests which found that a cached response expired<br>
are proxied to backend. I plan to implement busy locks to pass the single<br>
request and leave others to wait the response up to specified time.<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>The time you enjoy wasting is not wasted time!<br>