# HAProxy конфигурация # Автор: Сергей Антропов # Сайт: https://devops.org.ru global daemon maxconn 4096 log stdout local0 defaults mode tcp timeout connect 5000ms timeout client 50000ms timeout server 50000ms # PostgreSQL кластер listen postgresql bind *:5000 balance roundrobin option tcp-check tcp-check connect port 5432 {% for host in groups['patroni'] | default([]) %} server {{ host }} {{ host }}:5432 check {% endfor %} # Статистика HAProxy listen stats bind *:8404 stats enable stats uri /stats stats refresh 5s