feat-(overloaded pool 503 added)

This commit is contained in:
2026-11-17 16:34:35 +03:00
parent 9af1020087
commit 036fe83c4d
14 changed files with 699 additions and 43 deletions
+40
View File
@@ -0,0 +1,40 @@
worker_processes auto;
events {
worker_connections 4096;
}
http {
access_log off;
sendfile on;
tcp_nopush on;
upstream backend {
server api:8080 max_fails=2 fail_timeout=10s;
${KEEPALIVE_DIRECTIVE}
}
server {
listen 80;
server_name _;
proxy_connect_timeout 5s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
proxy_next_upstream_timeout 10s;
location / {
proxy_pass http://backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
${PROXY_HTTP_VERSION_DIRECTIVE}
${PROXY_CONNECTION_DIRECTIVE}
}
}
}