Update inv_sig_helper configuration.
Since inv_sig_helper crashes a lot, it's better to run it under haproxy with a healthcheck. Invidious connects to haproxy and haproxy connects to inv_sig_helper. (inv_sig_helper replicas -> haproxy -> invidious instances)
This commit is contained in:
parent
241c46754c
commit
0483a238a4
2 changed files with 14 additions and 7 deletions
|
@ -3,18 +3,20 @@ services:
|
||||||
image: git.nadeko.net/fijxu/inv_sig_helper:master-4477ac8
|
image: git.nadeko.net/fijxu/inv_sig_helper:master-4477ac8
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
mem_limit: "512m"
|
mem_limit: "512m"
|
||||||
|
logging:
|
||||||
|
driver: none
|
||||||
init: true
|
init: true
|
||||||
command: ["--tcp", "0.0.0.0:12999"]
|
command: ["--tcp", "0.0.0.0:12999"]
|
||||||
environment:
|
environment:
|
||||||
- RUST_LOG=info
|
- RUST_LOG=info
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 16
|
replicas: 8
|
||||||
networks:
|
networks:
|
||||||
- invidious
|
- invidious
|
||||||
- gluetun_network
|
- gluetun_network
|
||||||
- gluetun_network_2
|
- gluetun_network_2
|
||||||
|
|
||||||
inv_sig_helper_haproxy:
|
sig-haproxy:
|
||||||
image: haproxy:lts-alpine
|
image: haproxy:lts-alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
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 16384
|
maxconn 16384
|
||||||
|
log stdout format raw local0 debug
|
||||||
|
|
||||||
resolvers docker
|
resolvers docker
|
||||||
# To be able to use multiple replicas of invidious
|
# To be able to use multiple replicas of invidious
|
||||||
|
@ -8,10 +9,11 @@ resolvers docker
|
||||||
nameserver dns1 127.0.0.11:53
|
nameserver dns1 127.0.0.11:53
|
||||||
|
|
||||||
defaults
|
defaults
|
||||||
timeout client 10s
|
log global
|
||||||
timeout connect 10s
|
option tcplog
|
||||||
timeout server 10s
|
timeout client 2000ms
|
||||||
timeout queue 30s
|
timeout connect 2000ms
|
||||||
|
timeout server 500ms
|
||||||
|
|
||||||
# Prometheus for graphs
|
# Prometheus for graphs
|
||||||
frontend prometheus
|
frontend prometheus
|
||||||
|
@ -28,5 +30,8 @@ frontend sighelper
|
||||||
backend sighelper
|
backend sighelper
|
||||||
mode tcp
|
mode tcp
|
||||||
balance leastconn
|
balance leastconn
|
||||||
|
option tcp-check
|
||||||
|
tcp-check send-binary 0512345678
|
||||||
|
tcp-check expect rbinary 12345678
|
||||||
option redispatch
|
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
|
||||||
|
|
Loading…
Reference in a new issue