docker-compose-configs/invidious/invidious-external/haproxy.cfg

38 lines
1 KiB
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
# 777 perms for all sockets
unix-bind mode 777
stats socket ipv4@0.0.0.0:8405 level admin
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 2
option redispatch
timeout client 30s
timeout connect 30s
timeout server 120s
timeout queue 10s
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