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
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue