From ebff374408bf5e73159cd96c4d745ed0315c8c78 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 25 Feb 2015 12:22:41 -0500 Subject: [PATCH] nginx: tweak rate limiting; remove webapp limiting --- conf/rate-limiting.conf | 5 ++--- conf/server-base.conf | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/conf/rate-limiting.conf b/conf/rate-limiting.conf index e25897d82..f9b43e6ef 100644 --- a/conf/rate-limiting.conf +++ b/conf/rate-limiting.conf @@ -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; diff --git a/conf/server-base.conf b/conf/server-base.conf index 9c6fdcc32..7e7c987f2 100644 --- a/conf/server-base.conf +++ b/conf/server-base.conf @@ -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/ {