Files
mtusi2026lab3/infra/haproxy.cfg
T

42 lines
894 B
INI

global
log stdout format raw local0
maxconn 2048
defaults
log global
mode http
option httplog
timeout connect 500ms
timeout client 10s
timeout server 9s
timeout http-request 3s
timeout http-keep-alive 5s
timeout check 500ms
retries 0
resolvers docker
nameserver dns 127.0.0.11:53
accepted_payload_size 8192
resolve_retries 2
timeout resolve 1s
timeout retry 1s
hold valid 1s
hold obsolete 1s
hold nx 1s
frontend public
bind :8080
default_backend api
backend api
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 replica 1-4 api:8080 check inter 500ms fall 2 rise 2 resolvers docker resolve-prefer ipv4 init-addr none
listen stats
bind :8404
stats enable
stats uri /stats