diff --git a/invidious/inv_sig_helper_cluster/docker-compose.yml b/invidious/inv_sig_helper_cluster/docker-compose.yml index 3aad1dc..9ed551e 100644 --- a/invidious/inv_sig_helper_cluster/docker-compose.yml +++ b/invidious/inv_sig_helper_cluster/docker-compose.yml @@ -1,20 +1,23 @@ services: inv_sig_helper_cluster: - image: git.nadeko.net/fijxu/inv_sig_helper:master-4477ac8 + image: quay.io/invidious/inv-sig-helper restart: unless-stopped mem_limit: "512m" - logging: - driver: none + cpus: 0.2 init: true command: ["--tcp", "0.0.0.0:12999"] + stop_grace_period: 5s + logging: + driver: none environment: - - RUST_LOG=info + - RUST_LOG=warn deploy: - replicas: 8 + replicas: 5 networks: - invidious - - gluetun_network - - gluetun_network_2 + # - gluetun_network + # - gluetun_network_2 + # - invidious-external sig-haproxy: image: haproxy:lts-alpine @@ -22,11 +25,12 @@ services: ports: - "127.0.0.1:10095:8405" volumes: - - ./haproxy:/usr/local/etc/haproxy + - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg networks: - invidious - gluetun_network - gluetun_network_2 + - invidious-external networks: invidious: @@ -35,3 +39,5 @@ networks: external: true gluetun_network_2: external: true + invidious-external: + external: true diff --git a/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg b/invidious/inv_sig_helper_cluster/haproxy.cfg similarity index 73% rename from invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg rename to invidious/inv_sig_helper_cluster/haproxy.cfg index bd91849..185e203 100644 --- a/invidious/inv_sig_helper_cluster/haproxy/haproxy.cfg +++ b/invidious/inv_sig_helper_cluster/haproxy.cfg @@ -1,7 +1,6 @@ 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 + maxconn 128 resolvers docker # To be able to use multiple replicas of invidious @@ -9,11 +8,13 @@ resolvers docker nameserver dns1 127.0.0.11:53 defaults - log global - option tcplog - timeout client 2000ms - timeout connect 2000ms - timeout server 500ms + # Without timeouts to prevent haproxy kill the connection + # when there is no packets being sent between the sig helper and + # invidious + + #timeout client 60s + #timeout connect 1s + #timeout server 60s # Prometheus for graphs frontend prometheus @@ -32,6 +33,6 @@ backend sighelper balance leastconn option tcp-check tcp-check send-binary 0512345678 - tcp-check expect rbinary 12345678 + tcp-check expect rbinary 12345678* option redispatch server-template inv_sig_helper 16 inv_sig_helper_cluster:12999 resolvers docker check inter 500ms