This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/conf/rate-limiting.conf
Jimmy Zelinskie 6cbd4ee4fe Add rate limiting to nginx.
The only caveat is that "One megabyte zone can keep about 16 thousand
64-byte states. If the zone storage is exhausted, the server will return
the 503 (Service Temporarily Unavailable) error to all further
requests."
  -- nginx documentation
2015-01-13 15:59:04 -05:00

6 lines
187 B
Nginx Configuration File

# vim: ft=nginx
limit_req_zone $binary_remote_addr zone=webapp:10m rate=10r/s;
limit_req_zone $binary_remote_addr zone=api:10m rate=1r/s;
limit_req_status 429;
limit_req_log_level warn;