Исправить readiness LB и ресурсные лимиты

This commit is contained in:
EgorAnti
2026-11-05 12:48:30 +03:00
parent 7080fdd3e2
commit 9c3e4fd126
24 changed files with 466 additions and 45 deletions
+11
View File
@@ -21,12 +21,23 @@ http {
server {
listen 80;
server_name _;
proxy_intercept_errors on;
error_page 502 503 504 = @no_ready_api;
location = /nginx-health {
default_type application/json;
return 200 '{"status":"ok"}';
}
location @no_ready_api {
internal;
default_type application/json;
add_header X-Request-Id $request_id always;
add_header X-Instance-Id nginx always;
add_header Cache-Control "no-store" always;
return 503 '{"error":{"code":"unavailable","message":"No ready API backend","request_id":"$request_id"}}';
}
location ~ ^/api/v1/chats/[0-9a-fA-F-]+/messages$ {
proxy_pass http://api_backend;
proxy_http_version 1.1;