Skip to content

Commit cbfef31

Browse files
authored
update rate limits for api (#10876)
1 parent 63246c6 commit cbfef31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docker/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ http {
7070
limit_req_zone $rate_limit_key zone=web_limit:10m rate=1r/s;
7171
# Higher rate for APIs since they are cheaper and we often hit them
7272
# multiple times per page load.
73-
limit_req_zone $rate_limit_key zone=api_limit:10m rate=200r/m;
73+
limit_req_zone $rate_limit_key zone=api_limit:10m rate=180r/m;
7474
# Set a more permissive limit for covers because some pages might load 20+ covers.
7575
limit_req_zone $rate_limit_key zone=cover_limit:10m rate=400r/m;
7676

docker/web_nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ server {
143143
}
144144

145145
location ~ ^(/api/.*|.*\.json)$ {
146-
limit_req zone=api_limit burst=200 nodelay;
146+
limit_req zone=api_limit burst=25 delay=10;
147147
limit_req_status 429;
148148

149149
if ($http_user_agent ~ (Bytespider) ) {

0 commit comments

Comments
 (0)