Files

44 lines
1.2 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
global
log stdout format raw local0
maxconn 2048
stats socket /tmp/haproxy.sock mode 600 level admin
stats socket ipv4@127.0.0.1:9999 level admin
defaults
log global
mode http
option httplog
timeout connect 1s
timeout client 15s
timeout server 12s
timeout http-request 7s
timeout http-keep-alive 2s
timeout check 1s
# Не повторяем POST автоматически: неизвестный результат повторяет клиент
# с исходным Idempotency-Key. Соединения к недоступному API не ждут долго.
retries 0
resolvers docker
nameserver dns 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold valid 1s
hold obsolete 1s
hold nx 1s
hold timeout 1s
hold refused 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
default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 2
server-template api 1-16 api:8080 check resolvers docker resolve-prefer ipv4 init-addr none