Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Document stream writer typing, to_device, account_data, receipts, and presence can only be used on a single worker. #12196

Merged
merged 5 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12196.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document that the `typing`, `to_device`, `account_data`, `receipts`, and `presence` stream writer can only be used on a single worker.
31 changes: 17 additions & 14 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,11 @@ is only supported with Redis-based replication.)

To enable this, the worker must have a HTTP replication listener configured,
have a `worker_name` and be listed in the `instance_map` config. The same worker
can handle multiple streams. For example, to move event persistence off to a
dedicated worker, the shared configuration would include:
can handle multiple streams, but unless otherwise documented, each stream can only
have a single writer.

For example, to move event persistence off to a dedicated worker, the shared
configuration would include:

```yaml
instance_map:
Expand All @@ -370,8 +373,8 @@ streams and the endpoints associated with them:

##### The `events` stream

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
The `events` stream 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:

Expand All @@ -384,38 +387,38 @@ stream_writers:

##### The `typing` stream

The following endpoints should be routed directly to the workers configured as
stream writers for the `typing` stream:
The following endpoints should be routed directly to the worker configured as
the stream writer for the `typing` stream:

^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing

##### The `to_device` stream

The following endpoints should be routed directly to the workers configured as
stream writers for the `to_device` stream:
The following endpoints should be routed directly to the worker configured as
the stream writer for the `to_device` stream:

^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/

##### The `account_data` stream

The following endpoints should be routed directly to the workers configured as
stream writers for the `account_data` stream:
The following endpoints should be routed directly to the worker configured as
the stream writer for the `account_data` stream:

^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags
^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data

##### The `receipts` stream

The following endpoints should be routed directly to the workers configured as
stream writers for the `receipts` stream:
The following endpoints should be routed directly to the worker configured as
the stream writer for the `receipts` stream:

^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers

##### The `presence` stream

The following endpoints should be routed directly to the workers configured as
stream writers for the `presence` stream:
The following endpoints should be routed directly to the worker configured as
the stream writer for the `presence` stream:

^/_matrix/client/(api/v1|r0|v3|unstable)/presence/

Expand Down