summary refs log tree commit diff
path: root/docs/workers.md
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-11-13 12:05:55 +0000
committerErik Johnston <erik@matrix.org>2020-11-13 12:05:55 +0000
commit52984e9e695ac446e43fec0d8676f71c1130c837 (patch)
treecd9e2a02704aefa0e3f560bd6439f271466427f7 /docs/workers.md
parentMerge branch 'rav/fix_sighup' into matrix-org-hotfixes (diff)
parentAdd metrics for tracking 3PID /requestToken requests. (#8712) (diff)
downloadsynapse-52984e9e695ac446e43fec0d8676f71c1130c837.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'docs/workers.md')
-rw-r--r--docs/workers.md21
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/workers.md b/docs/workers.md

index 84a9759e34..c53d1bd2ff 100644 --- a/docs/workers.md +++ b/docs/workers.md
@@ -116,7 +116,7 @@ public internet; it has no authentication and is unencrypted. ### Worker configuration In the config file for each worker, you must specify the type of worker -application (`worker_app`), and you should specify a unqiue name for the worker +application (`worker_app`), and you should specify a unique name for the worker (`worker_name`). The currently available worker applications are listed below. You must also specify the HTTP replication endpoint that it should talk to on the main synapse process. `worker_replication_host` should specify the host of @@ -262,6 +262,9 @@ using): Note that a HTTP listener with `client` and `federation` resources must be configured in the `worker_listeners` option in the worker config. +Ensure that all SSO logins go to a single process (usually the main process). +For multiple workers not handling the SSO endpoints properly, see +[#7530](https://github.com/matrix-org/synapse/issues/7530). #### Load balancing @@ -302,7 +305,7 @@ Additionally, there is *experimental* support for moving writing of specific streams (such as events) off of the main process to a particular worker. (This is only supported with Redis-based replication.) -Currently support streams are `events` and `typing`. +Currently supported streams are `events` and `typing`. To enable this, the worker must have a HTTP replication listener configured, have a `worker_name` and be listed in the `instance_map` config. For example to @@ -319,6 +322,18 @@ stream_writers: events: event_persister1 ``` +The `events` stream also experimentally supports having multiple writers, where +work is sharded between them by room ID. Note that you *must* restart all worker +instances when adding or removing event persisters. An example `stream_writers` +configuration with multiple writers: + +```yaml +stream_writers: + events: + - event_persister1 + - event_persister2 +``` + #### Background tasks There is also *experimental* support for moving background tasks to a separate @@ -408,6 +423,8 @@ and you must configure a single instance to run the background tasks, e.g.: media_instance_running_background_jobs: "media-repository-1" ``` +Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for both inbound client and federation requests (if they are handled separately). + ### `synapse.app.user_dir` Handles searches in the user directory. It can handle REST endpoints matching