Add initial support for synapse workers

· needs documentation; no checks yet for port clashes or typos in worker name
· according to https://github.com/matrix-org/synapse/wiki/Workers-setup-with-nginx#results
  about 90% of requests go to the synchrotron endpoint
· thus, the synchrotron worker is especially suited to be load-balanced
· most of the other workers are documented to support only a single instance
· https://github.com/matrix-org/synapse/blob/master/docs/workers.md
This commit is contained in:
Marcel Partap
2020-04-10 23:44:53 +02:00
parent f8ada98c19
commit 353bc7c362
8 changed files with 217 additions and 0 deletions

View File

@ -258,6 +258,43 @@ matrix_synapse_metrics_port: 9100
# See https://github.com/matrix-org/synapse/blob/master/docs/manhole.md
matrix_synapse_manhole_enabled: false
# Enable support for Synapse workers
matrix_synapse_workers_enabled: false
# List of workers to spawn
matrix_synapse_workers_enabled_list: []
# Default list of workers to spawn
matrix_synapse_workers_enabled_list:
- { worker: synchrotron, port: 8082 }
- { worker: synchrotron, port: 8083 }
- { worker: synchrotron, port: 8084 }
- { worker: appservice, port: 8085 }
- { worker: client_reader, port: 8086 }
- { worker: event_creator, port: 8087 }
- { worker: federation_reader, port: 8088 }
- { worker: federation_sender, port: 8089 }
- { worker: frontend_proxy, port: 8090 }
- { worker: media_repository, port: 8091 }
- { worker: pusher, port: 8092 }
- { worker: user_dir, port: 8093 }
# The list of available workers (2020-04-14)
matrix_synapse_workers_avail_list:
- appservice
- client_reader
- event_creator
- federation_reader
- federation_sender
- frontend_proxy
- media_repository
- pusher
- synchrotron
- user_dir
# Ports used for communication between main synapse process and workers
matrix_synapse_replication_tcp_port: 9092
matrix_synapse_replication_http_port: 9093
# Send ERROR logs to sentry.io for easier tracking
# To set this up: go to sentry.io, create a python project, and set