docker-compose-configs/invidious/invidious-all/haproxy.cfg
2024-12-24 21:32:31 -03:00

36 lines
955 B
INI

global
# This because haproxy is dumb and likes to use the maxconnection from the kernel and that is super mega huge making haproxy oom
maxconn 8192
resolvers docker
# To be able to use multiple replicas of invidious
# using domains
nameserver dns1 127.0.0.11:53
defaults
mode http
# https://www.haproxy.com/documentation/haproxy-configuration-tutorials/service-reliability/retries/
# Use another server if one takes too long to reply
retries 4
option redispatch
timeout client 30s
timeout connect 30s
timeout server 120s
timeout queue 20s
http-reuse always
# Prometheus for graphs
frontend prometheus
bind *:8404
mode http
http-request use-service prometheus-exporter if { path /metrics }
no log
frontend invidious
bind *:8001
default_backend invidious
backend invidious
balance roundrobin
server-template invidious 8 invidious:3000 check resolvers docker init-addr libc,none