Nginx $upstream_cache_status not available when used in rate limiting

Valentin V. Bartenev vbart at nginx.com
Wed Jul 20 21:56:39 UTC 2016


On Wednesday 20 July 2016 14:52:10 linnading wrote:
> Hi Francis,
> 
> It is "to the same upstream server"  that I care about.  I would like to
> limit the request rate to the same upstream server.
> 
> The Scenarios is like:
> 10 requests at the same time to the same upstream server, the upstream
> server should only receive requests at rate 1r/m. Last few requests will be
> delayed or rejected. But for these last few requests, some of them can be
> served by cache, they should not be delayed/rejected. 
> 
[..]

While "proxy_cache_lock" isn't what you're asking about, it can significantly
reduce number of requests that reaches your upstream server.

http://nginx.org/r/proxy_cache_lock

  wbr, Valentin V. Bartenev



More information about the nginx mailing list