Files
mtusi2026lab3/infra/haproxy.cfg
T
2026-11-24 17:37:25 +03:00

32 lines
763 B
INI

global
log stdout format raw local0
defaults
mode http
timeout connect 1s
timeout client 15s
timeout server 15s
retries 2
option redispatch
resolvers docker
nameserver dns 127.0.0.11:53
hold valid 2s
hold nx 2s
hold other 2s
resolve_retries 3
timeout resolve 1s
timeout retry 1s
frontend fe
bind *:8080
default_backend api
backend api
balance roundrobin
option httpchk GET /health/ready
http-check expect status 200
# проверка каждую 1 с, 2 неудачи подряд = backend выключен (~2-3 с на обнаружение отказа)
default-server check inter 1s fall 2 rise 2 init-addr none resolvers docker
server-template app 1-6 app:8080