Proxy_cache_use_stale, updating question

Hello,

If I understand the code correctly, when I don’t have the cache file,
request is going directly
to upstream, so when I have 100 request at the time when I don’t have
the cache file yet, all
those requests will go to upstream servers, am I correct?

On Tue, Oct 27, 2009 at 01:51:29PM +0100, Tomasz P. wrote:

Hello,

If I understand the code correctly, when I don’t have the cache file,
request is going directly
to upstream, so when I have 100 request at the time when I don’t have
the cache file yet, all
those requests will go to upstream servers, am I correct?

Yes.

Hello,

If I understand the code correctly, when I don’t have the cache file,
request is going directly
to upstream, so when I have 100 request at the time when I don’t have
the cache file yet, all
those requests will go to upstream servers, am I correct?

Yes.
Wouldn’t it be better to send only one request, and tell other to wait
for the page when updating is set?

Hello!

On Tue, Oct 27, 2009 at 02:30:24PM +0100, Tomasz P. wrote:

wait for the page when updating is set?
Yes. This is called “busy locks” in mod_accel, and usually
referenced here under the same name. It’s planned but not
implemented in nginx yet.

Maxim D.

Wouldn’t it be better to send only one request, and tell other to wait
for the page when updating is set?

Yes, of course, it would be better, however, currently it is not implemented.
Do You see any chance of implementing this in near future?

On Tue, Oct 27, 2009 at 02:30:24PM +0100, Tomasz P. wrote:

Wouldn’t it be better to send only one request, and tell other to wait
for the page when updating is set?

Yes, of course, it would be better, however, currently it is not
implemented.

On Tue, Oct 27, 2009 at 02:56:59PM +0100, Tomasz P. wrote:

Wouldn’t it be better to send only one request, and tell other to wait
for the page when updating is set?

Yes, of course, it would be better, however, currently it is not implemented.
Do You see any chance of implementing this in near future?

Yes.

I also would love to see this feature implemented, have you had any
progress on this?
Of course I’d be available for testing and feedback.
Thanks, TonyT

Posted at Nginx Forum:

Wouldn’t it be better to send only one request, and tell other to wait
for the page when updating is set?

Yes, of course, it would be better, however, currently it is not implemented.

Do You see any chance of implementing this in near future?

Yes.
That’s great news. If You need testing give me a shout!

Busy lock working with:

proxy_cache_lock on;

Tested here:

$ nginx -v
nginx version: nginx/1.1.19

$ab -n 3 -c 3 http://localhost/resource/8

$ tail -f /tmp/proxy.log
[24/Jul/2012:23:19:07 -0300] /resource/8 200 MISS 200
[24/Jul/2012:23:19:07 -0300] /resource/8 200 HIT -
[24/Jul/2012:23:19:07 -0300] /resource/8 200 HIT -

Tiago Albineli Motta
http://programandosemcafeina.blogspot.com

Posted at Nginx Forum: