Сделана лаба 4

This commit is contained in:
2026-11-16 22:00:34 +03:00
parent ec540a1a72
commit de2246a888
19 changed files with 1437 additions and 40 deletions
+21
View File
@@ -0,0 +1,21 @@
upstream messenger_api {
server api1:8080 max_fails=1 fail_timeout=2s;
server api2:8080 max_fails=1 fail_timeout=2s;
}
server {
listen 80;
client_max_body_size 11m;
location / {
proxy_pass http://messenger_api;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Request-Id $http_x_request_id;
proxy_connect_timeout 1s;
proxy_read_timeout 10s;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
}
}