This commit is contained in:
clokep 2022-03-10 18:16:50 +00:00
parent 8b3d5bbdc8
commit 4de562bcee
4 changed files with 34 additions and 30 deletions

View file

@ -9097,8 +9097,10 @@ streams (such as events) off of the main process to a particular worker. (This
is only supported with Redis-based replication.)</p> is only supported with Redis-based replication.)</p>
<p>To enable this, the worker must have a HTTP replication listener configured, <p>To enable this, the worker must have a HTTP replication listener configured,
have a <code>worker_name</code> and be listed in the <code>instance_map</code> config. The same worker have a <code>worker_name</code> and be listed in the <code>instance_map</code> config. The same worker
can handle multiple streams. For example, to move event persistence off to a can handle multiple streams, but unless otherwise documented, each stream can only
dedicated worker, the shared configuration would include:</p> have a single writer.</p>
<p>For example, to move event persistence off to a dedicated worker, the shared
configuration would include:</p>
<pre><code class="language-yaml">instance_map: <pre><code class="language-yaml">instance_map:
event_persister1: event_persister1:
host: localhost host: localhost
@ -9111,8 +9113,8 @@ stream_writers:
be routed to the workers handling that stream. See below for the currently supported be routed to the workers handling that stream. See below for the currently supported
streams and the endpoints associated with them:</p> streams and the endpoints associated with them:</p>
<h5 id="the-events-stream"><a class="header" href="#the-events-stream">The <code>events</code> stream</a></h5> <h5 id="the-events-stream"><a class="header" href="#the-events-stream">The <code>events</code> stream</a></h5>
<p>The <code>events</code> stream also experimentally supports having multiple writers, where <p>The <code>events</code> stream experimentally supports having multiple writers, where work
work is sharded between them by room ID. Note that you <em>must</em> restart all worker is sharded between them by room ID. Note that you <em>must</em> restart all worker
instances when adding or removing event persisters. An example <code>stream_writers</code> instances when adding or removing event persisters. An example <code>stream_writers</code>
configuration with multiple writers:</p> configuration with multiple writers:</p>
<pre><code class="language-yaml">stream_writers: <pre><code class="language-yaml">stream_writers:
@ -9121,30 +9123,30 @@ configuration with multiple writers:</p>
- event_persister2 - event_persister2
</code></pre> </code></pre>
<h5 id="the-typing-stream"><a class="header" href="#the-typing-stream">The <code>typing</code> stream</a></h5> <h5 id="the-typing-stream"><a class="header" href="#the-typing-stream">The <code>typing</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>typing</code> stream:</p> the stream writer for the <code>typing</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
</code></pre> </code></pre>
<h5 id="the-to_device-stream"><a class="header" href="#the-to_device-stream">The <code>to_device</code> stream</a></h5> <h5 id="the-to_device-stream"><a class="header" href="#the-to_device-stream">The <code>to_device</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>to_device</code> stream:</p> the stream writer for the <code>to_device</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/ <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/
</code></pre> </code></pre>
<h5 id="the-account_data-stream"><a class="header" href="#the-account_data-stream">The <code>account_data</code> stream</a></h5> <h5 id="the-account_data-stream"><a class="header" href="#the-account_data-stream">The <code>account_data</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>account_data</code> stream:</p> the stream writer for the <code>account_data</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags
^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data
</code></pre> </code></pre>
<h5 id="the-receipts-stream"><a class="header" href="#the-receipts-stream">The <code>receipts</code> stream</a></h5> <h5 id="the-receipts-stream"><a class="header" href="#the-receipts-stream">The <code>receipts</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>receipts</code> stream:</p> the stream writer for the <code>receipts</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers
</code></pre> </code></pre>
<h5 id="the-presence-stream"><a class="header" href="#the-presence-stream">The <code>presence</code> stream</a></h5> <h5 id="the-presence-stream"><a class="header" href="#the-presence-stream">The <code>presence</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>presence</code> stream:</p> the stream writer for the <code>presence</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
</code></pre> </code></pre>
<h4 id="background-tasks"><a class="header" href="#background-tasks">Background tasks</a></h4> <h4 id="background-tasks"><a class="header" href="#background-tasks">Background tasks</a></h4>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -473,8 +473,10 @@ streams (such as events) off of the main process to a particular worker. (This
is only supported with Redis-based replication.)</p> is only supported with Redis-based replication.)</p>
<p>To enable this, the worker must have a HTTP replication listener configured, <p>To enable this, the worker must have a HTTP replication listener configured,
have a <code>worker_name</code> and be listed in the <code>instance_map</code> config. The same worker have a <code>worker_name</code> and be listed in the <code>instance_map</code> config. The same worker
can handle multiple streams. For example, to move event persistence off to a can handle multiple streams, but unless otherwise documented, each stream can only
dedicated worker, the shared configuration would include:</p> have a single writer.</p>
<p>For example, to move event persistence off to a dedicated worker, the shared
configuration would include:</p>
<pre><code class="language-yaml">instance_map: <pre><code class="language-yaml">instance_map:
event_persister1: event_persister1:
host: localhost host: localhost
@ -487,8 +489,8 @@ stream_writers:
be routed to the workers handling that stream. See below for the currently supported be routed to the workers handling that stream. See below for the currently supported
streams and the endpoints associated with them:</p> streams and the endpoints associated with them:</p>
<h5 id="the-events-stream"><a class="header" href="#the-events-stream">The <code>events</code> stream</a></h5> <h5 id="the-events-stream"><a class="header" href="#the-events-stream">The <code>events</code> stream</a></h5>
<p>The <code>events</code> stream also experimentally supports having multiple writers, where <p>The <code>events</code> stream experimentally supports having multiple writers, where work
work is sharded between them by room ID. Note that you <em>must</em> restart all worker is sharded between them by room ID. Note that you <em>must</em> restart all worker
instances when adding or removing event persisters. An example <code>stream_writers</code> instances when adding or removing event persisters. An example <code>stream_writers</code>
configuration with multiple writers:</p> configuration with multiple writers:</p>
<pre><code class="language-yaml">stream_writers: <pre><code class="language-yaml">stream_writers:
@ -497,30 +499,30 @@ configuration with multiple writers:</p>
- event_persister2 - event_persister2
</code></pre> </code></pre>
<h5 id="the-typing-stream"><a class="header" href="#the-typing-stream">The <code>typing</code> stream</a></h5> <h5 id="the-typing-stream"><a class="header" href="#the-typing-stream">The <code>typing</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>typing</code> stream:</p> the stream writer for the <code>typing</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
</code></pre> </code></pre>
<h5 id="the-to_device-stream"><a class="header" href="#the-to_device-stream">The <code>to_device</code> stream</a></h5> <h5 id="the-to_device-stream"><a class="header" href="#the-to_device-stream">The <code>to_device</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>to_device</code> stream:</p> the stream writer for the <code>to_device</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/ <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/
</code></pre> </code></pre>
<h5 id="the-account_data-stream"><a class="header" href="#the-account_data-stream">The <code>account_data</code> stream</a></h5> <h5 id="the-account_data-stream"><a class="header" href="#the-account_data-stream">The <code>account_data</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>account_data</code> stream:</p> the stream writer for the <code>account_data</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags
^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data
</code></pre> </code></pre>
<h5 id="the-receipts-stream"><a class="header" href="#the-receipts-stream">The <code>receipts</code> stream</a></h5> <h5 id="the-receipts-stream"><a class="header" href="#the-receipts-stream">The <code>receipts</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>receipts</code> stream:</p> the stream writer for the <code>receipts</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers
</code></pre> </code></pre>
<h5 id="the-presence-stream"><a class="header" href="#the-presence-stream">The <code>presence</code> stream</a></h5> <h5 id="the-presence-stream"><a class="header" href="#the-presence-stream">The <code>presence</code> stream</a></h5>
<p>The following endpoints should be routed directly to the workers configured as <p>The following endpoints should be routed directly to the worker configured as
stream writers for the <code>presence</code> stream:</p> the stream writer for the <code>presence</code> stream:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ <pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
</code></pre> </code></pre>
<h4 id="background-tasks"><a class="header" href="#background-tasks">Background tasks</a></h4> <h4 id="background-tasks"><a class="header" href="#background-tasks">Background tasks</a></h4>