I want to limit access to certain resources base on following rules:
-
each ip can only access the resources 333 times a day (or within
the last 24 hrs) -
no more than X simultaneous connections and no more than Xr/s
Currently, nginx can handle rule 2 with the limit zone module.
http://wiki.nginx.org/NginxHttpLimitZoneModule
location /resource {
limit_conn gullag 1;
limit_req zone=qincheng burst=1;
}
How do I go about rule 1? Thank you!