54 lines
1.2 KiB
INI
54 lines
1.2 KiB
INI
global
|
|
log stdout format raw local0 info
|
|
maxconn 2000
|
|
|
|
defaults
|
|
mode http
|
|
log global
|
|
option httplog
|
|
option http-server-close
|
|
option forwardfor
|
|
option redispatch
|
|
retries 2
|
|
retry-on conn-failure
|
|
timeout connect 1s
|
|
timeout client 30s
|
|
timeout server 60s
|
|
timeout check 1s
|
|
|
|
resolvers docker
|
|
nameserver dns 127.0.0.11:53
|
|
resolve_retries 2
|
|
timeout resolve 1s
|
|
timeout retry 1s
|
|
hold valid 2s
|
|
hold obsolete 2s
|
|
hold nx 2s
|
|
accepted_payload_size 8192
|
|
|
|
frontend messenger
|
|
bind :8080
|
|
monitor-uri /lb/health
|
|
use_backend api_live if { nbsrv(api) lt 1 }
|
|
default_backend api
|
|
|
|
backend api
|
|
balance roundrobin
|
|
option httpchk GET /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-4 api:8080
|
|
|
|
backend api_live
|
|
balance roundrobin
|
|
option httpchk GET /health/live
|
|
http-check expect status 200
|
|
default-server check inter 1s fall 2 rise 2 resolvers docker init-addr none
|
|
server-template live 1-4 api:8080
|
|
|
|
listen stats
|
|
bind :8404
|
|
stats enable
|
|
stats uri /
|
|
stats refresh 2s
|