forked from mtusi2026/mtusi2026lab3
40 lines
1.0 KiB
INI
40 lines
1.0 KiB
INI
global
|
||
log stdout format raw local0
|
||
|
||
defaults
|
||
mode http
|
||
log global
|
||
option httplog
|
||
timeout connect 1s
|
||
timeout client 30s
|
||
timeout server 10s
|
||
timeout check 2s
|
||
timeout queue 5s
|
||
retries 3
|
||
option redispatch
|
||
|
||
resolvers docker
|
||
nameserver dns 127.0.0.11:53
|
||
resolve_retries 3
|
||
timeout resolve 1s
|
||
timeout retry 1s
|
||
hold valid 1s
|
||
hold other 1s
|
||
hold nx 1s
|
||
hold timeout 1s
|
||
accepted_payload_size 8192
|
||
|
||
frontend public
|
||
bind :8080
|
||
default_backend api
|
||
|
||
backend api
|
||
balance roundrobin
|
||
# Проверка /health/ready раз в 1 с; backend исключается после 2 неудач подряд,
|
||
# возвращается после 2 успехов. Худшее время обнаружения: 2 x 1 с + timeout check 2 с = 4 с.
|
||
option httpchk
|
||
http-check send meth GET uri /health/ready
|
||
http-check expect status 200
|
||
default-server check inter 1s fall 2 rise 2 resolvers docker init-addr none
|
||
server-template api 1-8 api:8080
|