Igor, thanks. <br><br><div class="gmail_quote">2009/5/12 Igor Sysoev <span dir="ltr"><<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>></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>
> Hello igor,<br>
><br>
> I have a question about the cache behaviour in proxy mode.<br>
><br>
> I have nginx in front head which redirect to an apache back end. Nginx<br>
> caches eveything for M minutes.<br>
><br>
> If I have a large number of requests for the same page and this page<br>
> is cached : nginx returns the cached page ... no problems<br>
> After M minutes, the cached page expires<br>
> The first request coming after the expiration makes nginx to ask the<br>
> backend for refresh<br>
> When nginx receives the backend fresh response, it's saved to cache<br>
> and then nginx serves the fresh cached page<br>
><br>
> But what happen between the start of the request to the backend and<br>
> the end of the response from the backend ? (let's assume that the<br>
> backend serves the page in 5s ... and in 5s I can have a lot of<br>
> request to this page).:<br>
> - Are the request queued waiting for the backend response ?<br>
> - Every request makes try to refresh the cache from the backend ? (in<br>
> this case, I have multiple request for the same page to the backend<br>
> ... I can have a burst of request and my apache can be overflowed by<br>
> request -- that's why I'm using nignx with cache).<br>
> - Do the requests serve the cached page even if it's expired until the<br>
> backend response has been received ?<br>
> - 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>