Files
mtusi2026lab3/infra/haproxy.cfg
T

43 lines
970 B
INI

global
log stdout format raw local0
maxconn 1024
defaults
log global
mode http
option httplog
timeout connect 500ms
timeout client 10s
timeout server 5s
timeout http-request 5s
timeout http-keep-alive 5s
timeout queue 2s
timeout check 500ms
retries 2
retry-on conn-failure
option redispatch
resolvers docker
nameserver embedded 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold valid 1s
hold obsolete 1s
hold nx 1s
hold refused 1s
hold timeout 1s
hold other 1s
accepted_payload_size 8192
frontend public
bind :8080
default_backend api_pool
backend api_pool
balance roundrobin
option httpchk
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api
http-check expect status 200
server-template api 1-8 api:8080 check inter 500ms fall 2 rise 2 resolvers docker init-addr libc,none resolve-prefer ipv4