Реализовала лабораторную 3 на оценку 4

This commit is contained in:
MacBook
2026-10-16 12:42:16 +03:00
parent 0ab3a341aa
commit c1d62f7f23
32 changed files with 2141 additions and 35 deletions
+32
View File
@@ -0,0 +1,32 @@
events {}
http {
access_log /dev/stdout;
error_log /dev/stderr notice;
resolver 127.0.0.11 valid=2s ipv6=off;
upstream messenger_api {
zone messenger_api 64k;
server api1:8080 resolve max_fails=1 fail_timeout=2s;
server api2:8080 resolve max_fails=1 fail_timeout=2s;
keepalive 16;
}
server {
listen 8080;
location / {
proxy_pass http://messenger_api;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 500ms;
proxy_send_timeout 12s;
proxy_read_timeout 12s;
proxy_next_upstream error timeout http_502 http_504;
proxy_next_upstream_tries 2;
}
}
}