Исправить readiness LB и ресурсные лимиты
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user