From 9bb3ecb1254b6fb7c0954ce7fadb7a3ddb15512d Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Tue, 1 Oct 2024 06:50:48 +0200 Subject: [PATCH 1/3] explain load balancing for federation_sender_instances --- docs/usage/configuration/config_documentation.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index f51924f0646..b0e02190b28 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -4368,7 +4368,10 @@ It is possible to scale the processes that handle sending outbound federation re by running a [`generic_worker`](../../workers.md#synapseappgeneric_worker) and adding it's [`worker_name`](#worker_name) to a `federation_sender_instances` map. Doing so will remove handling of this function from the main process. Multiple workers can be added to this map, in which case the work is -balanced across them. +balanced across them. The way that the load balancing works is any outbound PDUs will be +assigned to a federation sender worker based on the hash of the destination server name. +So all events being sent to the same destination will be processed by the same worker instance. +Multiple `federation_sender_instances` are useful if there is a federation with multiple servers. This configuration setting must be shared between all workers handling federation sending, and if changed all federation sender workers must be stopped at the same time From 26b44d3deaedc99028b409390c2f48b270b097be Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Tue, 1 Oct 2024 06:58:13 +0200 Subject: [PATCH 2/3] add newsfile --- changelog.d/17776.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/17776.doc diff --git a/changelog.d/17776.doc b/changelog.d/17776.doc new file mode 100644 index 00000000000..86754a34646 --- /dev/null +++ b/changelog.d/17776.doc @@ -0,0 +1 @@ +Explain how load balancing works for `federation_sender_instances`. From 3a3ad29e2e9255e988262c96831d0a96ecd15496 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Thu, 3 Oct 2024 21:50:35 +0000 Subject: [PATCH 3/3] Update docs/usage/configuration/config_documentation.md --- docs/usage/configuration/config_documentation.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index b0e02190b28..08eedc03b71 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -4368,10 +4368,13 @@ It is possible to scale the processes that handle sending outbound federation re by running a [`generic_worker`](../../workers.md#synapseappgeneric_worker) and adding it's [`worker_name`](#worker_name) to a `federation_sender_instances` map. Doing so will remove handling of this function from the main process. Multiple workers can be added to this map, in which case the work is -balanced across them. The way that the load balancing works is any outbound PDUs will be -assigned to a federation sender worker based on the hash of the destination server name. -So all events being sent to the same destination will be processed by the same worker instance. -Multiple `federation_sender_instances` are useful if there is a federation with multiple servers. +balanced across them. + +The way that the load balancing works is any outbound federation request will be assigned +to a federation sender worker based on the hash of the destination server name. This +means that all requests being sent to the same destination will be processed by the same +worker instance. Multiple `federation_sender_instances` are useful if there is a federation +with multiple servers. This configuration setting must be shared between all workers handling federation sending, and if changed all federation sender workers must be stopped at the same time