forked from mtusi2026/mtusi2026lab3
42 lines
962 B
INI
42 lines
962 B
INI
global
|
|
log stdout format raw local0
|
|
maxconn 4096
|
|
|
|
defaults
|
|
log global
|
|
mode http
|
|
option httplog
|
|
option dontlognull
|
|
timeout connect 2s
|
|
timeout client 30s
|
|
timeout server 30s
|
|
timeout http-request 10s
|
|
timeout http-keep-alive 30s
|
|
retries 2
|
|
option redispatch
|
|
|
|
resolvers docker
|
|
nameserver dns 127.0.0.11:53
|
|
resolve_retries 3
|
|
timeout resolve 1s
|
|
timeout retry 1s
|
|
|
|
frontend api_frontend
|
|
bind *:8080
|
|
default_backend api
|
|
|
|
backend api
|
|
balance roundrobin
|
|
option httpchk GET /health/ready
|
|
http-check expect status 200
|
|
default-server check inter 1s fastinter 500ms downinter 1s fall 2 rise 2
|
|
# 16 slots is thus the upper bound for API_REPLICAS
|
|
server-template api 16 api:8080 resolvers docker init-addr last,libc,none
|
|
|
|
frontend stats
|
|
bind *:8404
|
|
http-request use-service prometheus-exporter if { path /metrics }
|
|
stats enable
|
|
stats uri /stats
|
|
stats refresh 5s
|