Created
March 21, 2017 20:24
-
-
Save sportebois/c569bafa8abbc23cd43cb37d7d824bfc to your computer and use it in GitHub Desktop.
Simple NGINX config to compare base rate limiting, burst, and burst with nodelay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
limit_req_zone $request_uri zone=by_uri:10m rate=30r/m; | |
server { | |
listen 80; | |
location /by-uri/burst0 { | |
limit_req zone=by_uri; | |
try_files $uri /index.html; | |
} | |
location /by-uri/burst5 { | |
limit_req zone=by_uri burst=5; | |
try_files $uri /index.html; | |
} | |
location /by-uri/burst5_nodelay { | |
limit_req zone=by_uri burst=5 nodelay; | |
try_files $uri /index.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment