Skip to content

Commit

Permalink
Adjust nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhima-Mochi committed Jan 23, 2024
1 parent 9fd3bff commit f67c844
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ events {
}

http {
limit_req_zone $binary_remote_addr zone=postLimit:10m rate=10r/s; # 10 requests per second
limit_req_zone $binary_remote_addr zone=postLimit:10m rate=500r/s; # 500 requests per second

upstream loadbalancer {
server host.docker.internal:9000;
Expand All @@ -18,7 +18,8 @@ http {
}

location /api/v1/urls {
limit_req zone=postLimit burst=100;
limit_req zone=postLimit burst=1000;
limit_req_status 429;
proxy_pass http://loadbalancer;
}
}
Expand Down

0 comments on commit f67c844

Please sign in to comment.