nginx: adjust proxy protocol rate limiting values
This commit is contained in:
parent
b5f7777fd7
commit
f99025f123
2 changed files with 17 additions and 7 deletions
|
@ -19,7 +19,7 @@ proxy_set_header Transfer-Encoding $http_transfer_encoding;
|
|||
location / {
|
||||
proxy_pass http://web_app_server;
|
||||
|
||||
limit_req zone=webapp burst=10 nodelay;
|
||||
limit_req zone=webapp burst=25 nodelay;
|
||||
}
|
||||
|
||||
location /realtime {
|
||||
|
@ -28,6 +28,20 @@ location /realtime {
|
|||
proxy_request_buffering off;
|
||||
}
|
||||
|
||||
location /v1/repositories/ {
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_request_buffering off;
|
||||
|
||||
proxy_pass http://registry_app_server;
|
||||
proxy_read_timeout 2000;
|
||||
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
|
||||
|
||||
client_max_body_size 20G;
|
||||
|
||||
limit_req zone=repositories burst=5 nodelay;
|
||||
}
|
||||
|
||||
location /v1/ {
|
||||
proxy_buffering off;
|
||||
|
||||
|
@ -38,8 +52,6 @@ location /v1/ {
|
|||
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
|
||||
|
||||
client_max_body_size 20G;
|
||||
|
||||
limit_req zone=api burst=5 nodelay;
|
||||
}
|
||||
|
||||
location /c1/ {
|
||||
|
@ -50,8 +62,6 @@ location /c1/ {
|
|||
proxy_pass http://verbs_app_server;
|
||||
proxy_read_timeout 2000;
|
||||
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
|
||||
|
||||
limit_req zone=api burst=5 nodelay;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# vim: ft=nginx
|
||||
|
||||
limit_req_zone $proxy_protocol_addr zone=webapp:10m rate=10r/s;
|
||||
limit_req_zone $proxy_protocol_addr zone=api:10m rate=1r/s;
|
||||
limit_req_zone $proxy_protocol_addr zone=webapp:10m rate=25r/s;
|
||||
limit_req_zone $proxy_protocol_addr zone=repositories:10m rate=1r/s;
|
||||
limit_req_status 429;
|
||||
limit_req_log_level warn;
|
||||
|
|
Reference in a new issue