[Pkg-matrix-maintainers] Bug#927274: Include config for workers
Jörg Sommer
joerg at jo-so.de
Wed Apr 17 09:32:18 BST 2019
Package: matrix-synapse
Version: 0.99.2-3
Severity: normal
The Synapse workers are a way to split the Synapse process into pieces and
possibly distribute them over multiple systems to balance the load between
these nodes. But even on a sole system, workers give an improvement in
response time and user experience. To ease the use of this workers it
would be helpful to include the config files in the Debian package.
To use workers you have to use a reverse proxy like Nginx or Apache to
send some of the requests to other processes than the main process. The
start of the worker processes could easily be done by Systemd.
To reroute the requests, there are rules for Nginx in
/etc/matrix-synapse/worker/*.nginx. For each worker you can reference these
rules in the *location* block:
location /_matrix/ {
proxy_pass http://[::1]:8008;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/matrix-synapse/worker/client_reader.nginx;
include /etc/matrix-synapse/worker/event_creator.nginx;
…
}
In homeserver.yaml, you have to add these entries
# The replication listener on the synapse to talk to.
worker_replication_host: 127.0.0.1
worker_replication_port: 9092
worker_replication_http_port: 9093
and some more for some of the workers; look at their config file in
/etc/matrix-synapse/worker. After this, restart the Synapse process.
Then go and enable the worker services you want to use (you don't have to
use all)
systemctl enable --now matrix-synapse at client_reader.service
matrix-synapse at event_creator.service
matrix-synapse at federation_reader.service
matrix-synapse at media_repository.service
matrix-synapse at synchrotron.service
In the end, it's pretty easy to use worker processes and having theses
config files in the Debian package would support the usage of them.
-- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.0.0-trunk-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_CRAP, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages matrix-synapse depends on:
ii adduser 3.118
ii debconf [debconf-2.0] 1.5.71
ii libjs-jquery 3.3.1~dfsg-1
ii libpython3-stdlib 3.7.3-1
ii lsb-base 10.2019031300
ii python3 3.7.3-1
pn python3-attr <none>
pn python3-bcrypt <none>
pn python3-canonicaljson <none>
pn python3-daemonize <none>
ii python3-distutils 3.7.3-1
pn python3-frozendict <none>
pn python3-jsonschema <none>
pn python3-msgpack <none>
pn python3-nacl <none>
pn python3-netaddr <none>
ii python3-openssl 19.0.0-1
pn python3-phonenumbers <none>
ii python3-pil 5.4.1-2
pn python3-prometheus-client <none>
pn python3-psutil <none>
ii python3-pyasn1 0.4.2-3
ii python3-pyasn1-modules 0.2.1-0.2
pn python3-pymacaroons <none>
pn python3-service-identity <none>
pn python3-signedjson <none>
ii python3-six 1.12.0-1
pn python3-sortedcontainers <none>
pn python3-systemd <none>
pn python3-treq <none>
pn python3-twisted <none>
pn python3-unpaddedbase64 <none>
pn python3-yaml <none>
Versions of packages matrix-synapse recommends:
pn python3-bleach <none>
ii python3-jinja2 2.10-2
ii python3-lxml 4.3.3-1
pn python3-psycopg2 <none>
Versions of packages matrix-synapse suggests:
pn python3-txacme <none>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: synapse-worker.tar
Type: application/x-tar
Size: 30720 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-matrix-maintainers/attachments/20190417/12f1a845/attachment-0001.tar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-matrix-maintainers/attachments/20190417/12f1a845/attachment-0001.sig>
More information about the Pkg-matrix-maintainers
mailing list