summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-07-28 11:06:24 +0100
committerErik Johnston <erik@matrix.org>2021-07-28 11:06:24 +0100
commita48296dd8691af895d0f756c9255e17fe655b5f7 (patch)
treec91c7e777fe34470c314a32b4afeb1320c97ac21
parentAllow /typing to be handled by any worker (diff)
downloadsynapse-erikj/workers.tar.xz
-rw-r--r--docs/workers.md31
1 files changed, 23 insertions, 8 deletions
diff --git a/docs/workers.md b/docs/workers.md

index d8672324c3..d24fb33202 100644 --- a/docs/workers.md +++ b/docs/workers.md
@@ -319,11 +319,24 @@ effects of bursts of events from that bridge on events sent by normal users. #### Stream writers -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.) +Additionally, there is 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 supported streams are `events` and `typing`. +Currently supported streams are, and which endpoints **must** be routed to them: + * `events` + + * `typing`: + * `^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/typing` + + * `to_device`: + `^/_matrix/client/(api/v1|r0|unstable)/sendToDevice/` + `^/_matrix/client/(api/v1|r0|unstable)/keys/claim` + `^/_matrix/client/(api/v1|r0|unstable)/room_keys` + + * `account_data` + * `receipts` + * `presence` 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 @@ -340,10 +353,10 @@ 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: +The `events` stream also 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: @@ -352,6 +365,8 @@ stream_writers: - event_persister2 ``` +All other streams currently only support having a single writer. + #### Background tasks There is also *experimental* support for moving background tasks to a separate