feat: implement lab3 API load balancing and failover

This commit is contained in:
sashadugina06
2026-11-06 01:43:33 +03:00
parent 0ab3a341aa
commit 7088791d5c
116 changed files with 7971 additions and 38 deletions
+35
View File
@@ -0,0 +1,35 @@
global
log stdout format raw local0
maxconn 1024
defaults
log global
mode http
option httplog
timeout connect 1s
timeout client 10s
timeout server 8s
timeout check 1s
# Never replay a potentially committed POST automatically.
retries 0
resolvers docker
nameserver dns 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold valid 1s
hold obsolete 1s
hold nx 1s
frontend public
bind :8080
default_backend replicas
backend replicas
balance roundrobin
option httpchk
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api
http-check expect status 200
default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 2 resolvers docker init-addr libc,none
server-template api 1-10 api:8080 check