nginx: tweak rate limiting; remove webapp limiting

This commit is contained in:
Jimmy Zelinskie 2015-02-25 12:22:41 -05:00
parent 82c02081f9
commit ebff374408
2 changed files with 4 additions and 7 deletions

View file

@ -9,8 +9,7 @@ map $http_authorization $registry_bucket {
default $http_authorization;
}
limit_req_zone $proxy_protocol_addr zone=webapp:10m rate=25r/s;
limit_req_zone $proxy_protocol_addr zone=api:10m rate=1r/s;
limit_req_zone $registry_bucket zone=repositories:10m rate=1r/s;
limit_req_zone $proxy_protocol_addr zone=api:10m rate=2r/s;
limit_req_zone $registry_bucket zone=repositories:10m rate=2r/s;
limit_req_status 429;
limit_req_log_level warn;

View file

@ -18,8 +18,6 @@ proxy_set_header Transfer-Encoding $http_transfer_encoding;
location / {
proxy_pass http://web_app_server;
limit_req zone=webapp;
}
location /realtime {
@ -37,7 +35,7 @@ location /v1/repositories/ {
proxy_read_timeout 2000;
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
limit_req zone=repositories burst=5;
limit_req zone=repositories burst=10;
}
location /v1/ {
@ -59,7 +57,7 @@ location /c1/ {
proxy_pass http://verbs_app_server;
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
limit_req zone=api burst=5;
limit_req zone=api burst=10;
}
location /static/ {