diff --git a/invidious/inv_sig_helper_cluster/docker-compose.yml b/invidious/inv_sig_helper_cluster/docker-compose.yml index eb56a76..3aad1dc 100644 --- a/invidious/inv_sig_helper_cluster/docker-compose.yml +++ b/invidious/inv_sig_helper_cluster/docker-compose.yml @@ -3,18 +3,20 @@ services: image: git.nadeko.net/fijxu/inv_sig_helper:master-4477ac8 restart: unless-stopped mem_limit: "512m" + logging: + driver: none init: true command: ["--tcp", "0.0.0.0:12999"] environment: - RUST_LOG=info deploy: - replicas: 16 + replicas: 8 networks: - invidious - gluetun_network - gluetun_network_2 - inv_sig_helper_haproxy: + sig-haproxy: image: haproxy:lts-alpine restart: always ports: diff --git a/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg b/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg index e89a0a8..bd91849 100644 --- a/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg +++ b/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg @@ -1,6 +1,7 @@ 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 16384 + log stdout format raw local0 debug resolvers docker # To be able to use multiple replicas of invidious @@ -8,10 +9,11 @@ resolvers docker nameserver dns1 127.0.0.11:53 defaults - timeout client 10s - timeout connect 10s - timeout server 10s - timeout queue 30s + log global + option tcplog + timeout client 2000ms + timeout connect 2000ms + timeout server 500ms # Prometheus for graphs frontend prometheus @@ -28,5 +30,8 @@ frontend sighelper backend sighelper mode tcp balance leastconn + option tcp-check + tcp-check send-binary 0512345678 + tcp-check expect rbinary 12345678 option redispatch - server-template inv_sig_helper 16 inv_sig_helper_cluster:12999 check resolvers docker init-addr libc,none inter 1s + server-template inv_sig_helper 16 inv_sig_helper_cluster:12999 resolvers docker check inter 500ms