https://github.com/steinitzu/throttlebox
A rate limiting nginx proxy in a docker
https://github.com/steinitzu/throttlebox
Last synced: 8 months ago
JSON representation
A rate limiting nginx proxy in a docker
- Host: GitHub
- URL: https://github.com/steinitzu/throttlebox
- Owner: steinitzu
- License: mit
- Created: 2017-05-25T20:58:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-25T20:58:30.000Z (about 9 years ago)
- Last Synced: 2025-03-04T07:15:13.398Z (over 1 year ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Throttlebox
Rate limiting and caching nginx proxy configuration for outbound API requests.
# Environment variables
## PROXY_PATH (required)
The URL to the api/website you want to proxy (e.g. http://api2.bigoven.com)
## RATE (default: 5r/s)
The maximum number of requests per second/minute. See [Nginx docs](http://nginx.org/en/docs/http/ngx_http_limit_req_module.html)
E.g. to limit to 100 requests per minute, you would use: `100r/m`
For 10 requests per second use: `10r/s`
## BURST (default: 500)
Requests over the specified rate limit are queued to process when a time window opens up. This sets the maximum number of requests that can be queued before the proxy starts denying them.
## CACHE_LIFETIME (default: 60s)
How long a cached resource is valid, any value accepted by nginx `proxy_cache_valid` will work here.