Re: Limit reqs per user / bot

2016-01-07 Thread itpp2012
No because one user (web browser) can easily open 20 or more simultaneous connections to get a better web response. A bot might be less prone to do the same but most connect at about 5 simultaneous connections. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,263891,263894#msg-263894 __

Re: How to setup Nginx as REALLY static-cache reverse proxy

2016-01-07 Thread austevo
Thanks for the responses guys. I've tried proxy_store on one config, but now I'm just receiving time-outs when I block the origin server. No stale cache on error at all. Here are two separate configs I'm using. The first one is as described earlier, with caching and stale cache errors working, al

Limit reqs per user / bot

2016-01-07 Thread djeyewater
I want to limit requests to 1 per second for each user, counting a bot that makes requests from multiple ips as a single user. Does this make sense: map $http_user_agent $single_user { default $binary_remote_addr; ~PaperLiBot 1; } limit_req_zone $single_user zone=one:10m r