Lab3: HAProxy, API replicas, idempotency for grade 4

This commit is contained in:
2026-11-11 01:29:57 +03:00
parent 0ab3a341aa
commit 9f25648c1b
37 changed files with 2083 additions and 26 deletions
+37
View File
@@ -0,0 +1,37 @@
global
maxconn 4096
log stdout format raw local0
defaults
mode http
log global
option httplog
option http-server-close
timeout connect 3s
timeout client 30s
timeout server 30s
timeout check 2s
retries 2
resolvers docker
nameserver dns1 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold other 5s
hold refused 5s
hold nx 5s
hold timeout 5s
hold valid 5s
hold obsolete 5s
frontend fe_http
bind *:8080
default_backend be_api
backend be_api
balance roundrobin
option httpchk GET /health/ready
http-check expect status 200
# Dynamic API tasks via Compose DNS; drop failed backends within ~4s (inter 2s * fall 2).
server-template api- 8 api:8080 check resolvers docker init-addr last,libc,none resolve-prefer ipv4 inter 2s fall 2 rise 1