Лабораторная 5

This commit is contained in:
2026-11-24 17:58:42 +03:00
parent 276dbdad8a
commit 3938900ec6
40 changed files with 3130 additions and 27 deletions
+24
View File
@@ -0,0 +1,24 @@
events {}
http {
upstream api {
server api1:8080 max_fails=1 fail_timeout=5s;
server api2:8080 max_fails=1 fail_timeout=5s;
}
server {
listen 8080;
client_max_body_size 11m;
location / {
proxy_pass http://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-Forwarded-Proto $scheme;
proxy_set_header Authorization $http_authorization;
proxy_set_header Idempotency-Key $http_idempotency_key;
proxy_connect_timeout 1s;
proxy_read_timeout 5s;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
}
}
}