chore: update invidious haproxy file

This commit is contained in:
root 2025-02-18 00:30:12 -03:00
parent 4ae8547f34
commit 1da2962fb9

View file

@ -1,3 +1,13 @@
# Notes:
# Why I deleted `balance roundrobin`:
#
# https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#4-balance:
# The load balancing algorithm of a backend is set to roundrobin when no other
# algorithm, mode nor option have been set. The algorithm may only be set once
# for each backend.
#
# ---
global global
# This because haproxy is dumb and likes to use the maxconnection from the kernel and that is super mega huge making haproxy oom # 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 maxconn 8192
@ -13,11 +23,13 @@ defaults
# Use another server if one takes too long to reply # Use another server if one takes too long to reply
retries 4 retries 4
option redispatch option redispatch
option http-keep-alive
timeout client 30s timeout client 30s
timeout connect 30s timeout connect 5s
timeout server 120s timeout server 10s
timeout queue 20s timeout queue 20s
http-reuse always # https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#4.2-http-reuse
http-reuse safe
# Prometheus for graphs # Prometheus for graphs
frontend prometheus frontend prometheus
@ -30,7 +42,33 @@ frontend invidious
bind *:8001 bind *:8001
default_backend invidious default_backend invidious
backend invidious frontend invidious2
balance roundrobin bind *:8002
server-template invidious 8 invidious:3000 check resolvers docker init-addr libc,none default_backend invidious2
frontend invidious3
bind *:8003
default_backend invidious3
frontend invidious4
bind *:8004
default_backend invidious4
frontend invidious5
bind *:8005
default_backend invidious5
backend invidious
server-template srv 2 invidious:3000 check resolvers docker init-addr libc,none
backend invidious2
server-template srv 2 invidious2:3000 check resolvers docker init-addr libc,none
backend invidious3
server-template srv 2 invidious3:3000 check resolvers docker init-addr libc,none
backend invidious4
server-template srv 2 invidious4:3000 check resolvers docker init-addr libc,none
backend invidious5
server-template srv 2 invidious5:3000 check resolvers docker init-addr libc,none