The rate is specified in requests per second (r/s). If a rate of less than one request per second is desired, it is specified in request per minute (r/m). For example, half-request per second is 30r/m.
# Allow not more than 12 request per minute at an average, with bursts not exceeding 1 requests.
limit_req_zone $binary_remote_addr zone=one:10m rate=12r/m;
server {
location /path/to/python/script.py {
limit_req zone=one burst=1;
}
}
相关问题 更多 >
编程相关推荐