Implement synchrotron balancing in nginx, replaces need for matrix-synchrotron-balancer

This commit is contained in:
uumas
2023-04-19 15:19:30 +03:00
parent 361e7d7e6b
commit 0f86bfbc02
9 changed files with 39 additions and 116 deletions

View File

@@ -1,12 +0,0 @@
# {{ ansible_managed }}
homeserver_url: http://localhost:8008 # homeserver URL for the whoami request
listener: localhost:{{ 8183 + ansible_loop.index0 }} # host:port to listen to
synchrotrons:
{% for port in synapse_workers[synchrotron_workers[item]] %}
- address: 127.0.0.1:{{ port }}
pid_file: /run/matrix-synapse/{{ synchrotron_workers[item] }}-{{ loop.index0 }}.pid
{% endfor %}
balancer:
interval: 2

View File

@@ -1,17 +0,0 @@
# {{ ansible_managed }}
[Unit]
Description=Matrix Synchrotron %i
After=matrix-synapse.service
PartOf=matrix-synapse.service
[Service]
Type=simple
User=matrix-synchrotron
WorkingDirectory=/opt/matrix-synchrotron/%i
ExecStart=/opt/matrix-synchrotron/src/matrix-synchrotron-balancer
Restart=always
RestartSec=3
[Install]
WantedBy=matrix-synapse.service