45 lines
1.3 KiB
INI
45 lines
1.3 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 invidious-1-vpn gluetun:3000 check init-addr libc,none
|
|
server invidious-2-vpn gluetun:3001 check init-addr libc,none
|
|
server invidious-3-vpn gluetun:3002 check init-addr libc,none
|
|
server invidious-4-vpn gluetun:3003 check init-addr libc,none
|
|
server invidious-5-vpn gluetun:3004 check init-addr libc,none
|
|
server invidious-6-vpn gluetun:3005 check init-addr libc,none
|
|
|