From bc854aa18322b635a87d4e5230b08cc6cc6b4e51 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 4 Jan 2026 13:09:18 +0000 Subject: [PATCH] perf: remove nginx rate limiting for internal package proxy - Removed rate limiting zones (10r/s for API, 5r/s for downloads) - Internal package proxy doesn't need rate limiting - During builds, package managers make hundreds of concurrent requests - Rate limiting was causing unnecessary delays and potential 429 errors This improves build performance significantly for CI/CD pipelines --- Dockerfile.frontend | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 9082d39..5baba86 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -44,10 +44,6 @@ upstream backend { keepalive 32; } -# Rate limiting zones -limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s; -limit_req_zone $binary_remote_addr zone=download_limit:10m rate=5r/s; - # Cache configuration proxy_cache_path /var/cache/nginx/static levels=1:2 keys_zone=static_cache:10m max_size=100m inactive=60m use_temp_path=off; @@ -77,9 +73,6 @@ server { # API endpoints - proxy to backend location /api/ { - # Rate limiting - limit_req zone=api_limit burst=20 nodelay; - # Proxy settings proxy_pass http://backend; proxy_http_version 1.1; @@ -120,10 +113,8 @@ server { proxy_set_header Connection ""; } - # Package download endpoints with rate limiting + # Package download endpoints location ~ ^/(npm|pypi|go)/ { - limit_req zone=download_limit burst=10 nodelay; - proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Host $host;