February 05, 2016 11:02AM
Anyone else noticed the same behavior?


I wasn't sure if that kind of behavior was correct, but as I said the lock works properly and only one request get forwarded to the backend server when there is no cached item in the cache (that is: the cache is empty), so to me the behavior should be the same when the cache is being refreshed (I don't see why it would be different?), but that is not the case... so it looks like a defect to me.

I also tried to confirm if other cache software do the same thing, such as varnish, and in theory they have this "waiting queue" which should guarantee that only one request gets forwarded, but there is a bug right now which actually makes the thing even worst than Nginx (at least Nginx sends a If-Modified-Since, but varnish just do a full request for all concurrent requests, their bug tracking ticket is https://www.varnish-cache.org/trac/ticket/1799). The workaround mentioned does no even provide the same behavior (it hits the old cache instead of waiting the queued request), so does not work for me.

Sorry for mentioning about a third party product such as varnish on this forum, but since I wasn't receiving any response, I wanted to see if other solutions had this functionality (and confirm my post made sense...), but then I am now back with Nginx as it works better (and is easier to use) anyway, at least until the bug is resolved on varnish. If this issue is resolved on nginx, that would be even better for me... nginx is more flexible and easier to use.
Subject Author Posted

proxy_cache_lock allow multiple requests to remote server in some cases

jeeeff January 28, 2016 07:13PM

Re: proxy_cache_lock allow multiple requests to remote server in some cases

jeeeff February 05, 2016 11:02AM

Re: proxy_cache_lock allow multiple requests to remote server in some cases

Maxim Dounin February 05, 2016 11:48AM

Re: proxy_cache_lock allow multiple requests to remote server in some cases

jeeeff February 05, 2016 12:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready