You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Update worker docs to update preferred settings for pusher and federation_sender (#14493)
* Fix one typo on line 3700(and apparently do something to other lines, no idea)
* Update config_documentation.md with more information about how federation_senders and pushers settings can be handled.
Specifically, that the instance map style of config does not require the special other variables that enable and disable functionality and that a single worker CAN be added to the map not only just two or more.
* Extra line here for consistency and appearance.
* Add link to sygnal repo.
* Add deprecation notice to workers.md and point to the newer alternative method of defining this functionality.
* Changelog
* Correct version number of Synapse the deprecation is happening in.
* Update quiet deprecation with simple notice and suggestion.
Unnecessary to set if using [`pusher_instances`](#pusher_instances) with [`generic_workers`](../../workers.md#synapseappgeneric_worker).
3710
+
3709
3711
Controls sending of push notifications on the main process. Set to `false`
3710
3712
if using a [pusher worker](../../workers.md#synapseapppusher). Defaults to `true`.
3711
3713
@@ -3716,25 +3718,30 @@ start_pushers: false
3716
3718
---
3717
3719
### `pusher_instances`
3718
3720
3719
-
It is possible to run multiple [pusher workers](../../workers.md#synapseapppusher),
3720
-
in which case the work is balanced across them. Use this setting to list the pushers by
3721
-
[`worker_name`](#worker_name). Ensure the main process and all pusher workers are
3722
-
restarted after changing this option.
3723
-
3724
-
If no or only one pusher worker is configured, this setting is not necessary.
3725
-
The main process will send out push notifications by default if you do not disable
3726
-
it by setting [`start_pushers: false`](#start_pushers).
3721
+
It is possible to scale the processes that handle sending push notifications to [sygnal](https://github.com/matrix-org/sygnal)
3722
+
and email by running a [`generic_worker`](../../workers.md#synapseappgeneric_worker) and adding it's [`worker_name`](#worker_name) to
3723
+
a `pusher_instances` map. Doing so will remove handling of this function from the main
3724
+
process. Multiple workers can be added to this map, in which case the work is balanced
3725
+
across them. Ensure the main process and all pusher workers are restarted after changing
3726
+
this option.
3727
3727
3728
-
Example configuration:
3728
+
Example configuration for a single worker:
3729
+
```yaml
3730
+
pusher_instances:
3731
+
- pusher_worker1
3732
+
```
3733
+
And for multiple workers:
3729
3734
```yaml
3730
-
start_pushers: false
3731
3735
pusher_instances:
3732
3736
- pusher_worker1
3733
3737
- pusher_worker2
3734
3738
```
3739
+
3735
3740
---
3736
3741
### `send_federation`
3737
3742
3743
+
Unnecessary to set if using [`federation_sender_instances`](#federation_sender_instances) with [`generic_workers`](../../workers.md#synapseappgeneric_worker).
3744
+
3738
3745
Controls sending of outbound federation transactions on the main process.
3739
3746
Set to `false` if using a [federation sender worker](../../workers.md#synapseappfederation_sender).
3740
3747
Defaults to `true`.
@@ -3746,29 +3753,36 @@ send_federation: false
3746
3753
---
3747
3754
### `federation_sender_instances`
3748
3755
3749
-
It is possible to run multiple
3750
-
[federation sender worker](../../workers.md#synapseappfederation_sender), in which
3751
-
case the work is balanced across them. Use this setting to list the senders.
3756
+
It is possible to scale the processes that handle sending outbound federation requests
3757
+
by running a [`generic_worker`](../../workers.md#synapseappgeneric_worker) and adding it's [`worker_name`](#worker_name) to
3758
+
a `federation_sender_instances` map. Doing so will remove handling of this function from
3759
+
the main process. Multiple workers can be added to this map, in which case the work is
3760
+
balanced across them.
3752
3761
3753
-
This configuration setting must be shared between all federation sender workers, and if
3754
-
changed all federation sender workers must be stopped at the same time and then
3755
-
started, to ensure that all instances are running with the same config (otherwise
3762
+
This configuration setting must be shared between all workers handling federation
3763
+
sending, and if changed all federation sender workers must be stopped at the same time
3764
+
and then started, to ensure that all instances are running with the same config (otherwise
3756
3765
events may be dropped).
3757
3766
3758
-
Example configuration:
3767
+
Example configuration for a single worker:
3759
3768
```yaml
3760
-
send_federation: false
3761
3769
federation_sender_instances:
3762
3770
- federation_sender1
3763
3771
```
3772
+
And for multiple workers:
3773
+
```yaml
3774
+
federation_sender_instances:
3775
+
- federation_sender1
3776
+
- federation_sender2
3777
+
```
3764
3778
---
3765
3779
### `instance_map`
3766
3780
3767
3781
When using workers this should be a map from [`worker_name`](#worker_name) to the
3768
3782
HTTP replication listener of the worker, if configured.
3769
-
Each worker declared under [`stream_writers`](../../workers.md#stream-writers) needs
3783
+
Each worker declared under [`stream_writers`](../../workers.md#stream-writers) needs
3770
3784
a HTTP replication listener, and that listener should be included in the `instance_map`.
3771
-
(The main process also needs an HTTP replication listener, but it should not be
3785
+
(The main process also needs an HTTP replication listener, but it should not be
Copy file name to clipboardExpand all lines: docs/workers.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -505,6 +505,9 @@ worker application type.
505
505
506
506
### `synapse.app.pusher`
507
507
508
+
It is likely this option will be deprecated in the future and is not recommended for new
509
+
installations. Instead, [use `synapse.app.generic_worker` with the `pusher_instances`](usage/configuration/config_documentation.md#pusher_instances).
510
+
508
511
Handles sending push notifications to sygnal and email. Doesn't handle any
509
512
REST endpoints itself, but you should set
510
513
[`start_pushers: false`](usage/configuration/config_documentation.md#start_pushers) in the
@@ -543,6 +546,9 @@ Note this worker cannot be load-balanced: only one instance should be active.
543
546
544
547
### `synapse.app.federation_sender`
545
548
549
+
It is likely this option will be deprecated in the future and not recommended for
550
+
new installations. Instead, [use `synapse.app.generic_worker` with the `federation_sender_instances`](usage/configuration/config_documentation.md#federation_sender_instances).
551
+
546
552
Handles sending federation traffic to other servers. Doesn't handle any
0 commit comments