Synapse federation sender and pusher workers

Synapse federation sender and pusher workers take outbound federation and push notifications off the main process, and outbound_federation_restricted_to lets you pin federation traffic to named workers for firewall rules.

On this page

When Synapse federation sender workers are worth planning

A single Synapse process can end up doing too much when it handles client requests, outbound federation and push notifications at once. When that happens, the team sees federation queues grow and push delivery lag behind events, even while client traffic looks normal. The two options that move this work out of the main process are federation_sender_instances and pusher_instances. The first assigns outbound federation transactions to named worker processes, and the second assigns push notification sending to named workers. You split them out when monitoring shows the main process is the bottleneck for outbound sends or pushes, not as a default step on every deployment.

Both options belong to the wider Synapse workers model, so they are not standalone switches. Each worker is a separate process with its own worker_app and configuration file, and every process, including the main one, must connect to Redis, which relays replication between them. The replication listener and its worker_replication_secret must be in place before any sender or pusher worker starts. Plan the Redis deployment, network placement and secret handling with the replication work, because a federation sender that cannot reach the main process will not help. Confirm the exact worker configuration for your Synapse version in the Synapse workers documentation before you write it.

If you also need to limit where outbound federation can go, Synapse added outbound_federation_restricted_to in version 1.89.0. It restricts outbound federation to the workers you list, which lets you apply firewall rules to those specific hosts, and it also requires worker_replication_secret. Decide early whether you need this control, because it changes which hosts need outbound network access. Check the Synapse configuration manual for how it interacts with your sender layout, and test federation end to end after each change.

How outbound federation and push flow through workers

The diagram starts at the main process, which hands federation and push work to dedicated workers over the private replication channel that Redis relays. Federation sender workers send outbound traffic to remote servers, while the federation listener handles inbound traffic behind a firewall. Check that the replication network stays private, and that the outbound_federation_restricted_to rule allows only the named workers to reach remote servers.

Outbound federation and push traffic leaving dedicated Synapse workers, inside a private replication boundary.

Which federation and pusher options fit which deployment

This table compares the five Synapse settings that govern outbound federation, push notifications and federation listener access, and shows which deployment situation each one fits. Read each row for what the setting does, what it requires, and when it applies, then confirm exact semantics against the configuration manual before you write any config.

SettingFits whenWhat it requiresWatch for
federation_sender_instancesOutbound federation sending has outgrown the main process and you want named workers to send transactions to other serversWorker processes declared in the worker config, a shared Redis for replication, and a generic worker or federation sender worker assigned to the roleConfirm how it interacts with outbound_federation_restricted_to in your Synapse version
pusher_instancesPush notification delivery is adding load to the main process and you want dedicated workers to send pushesWorker processes listed for pushers, Redis replication working, and a push gateway reachable from those workersPusher workers handle delivery only; check which background tasks still run on the main process
outbound_federation_restricted_toYou need outbound federation traffic to leave only from specific workers, for example to match a firewall rule that allows only those hostsAdded in Synapse 1.89.0; requires worker_replication_secret; the listed workers must exist and be reachableTest that every outbound path you expect still works before you close the main process's egress
worker_replication_secretAny worker deployment where workers must authenticate to the replication listenerA shared secret set identically on the main process and every worker, kept out of version controlRotating the secret requires restarting all processes; keep the replication listener on a private network
federation_domain_whitelistYou want federation limited to a fixed list of domains, or disabled entirely with an empty listOnly the configuration change itself; the docs recommend also firewalling the federation listenerA whitelist is a server-wide restriction and does not replace worker-level egress control

Choosing a split by deployment situation

On a single host, the goal is usually not to scale out but to stop one busy duty from slowing everything else. A small deployment rarely needs a federation sender at all, so the first step is to confirm that pushes or outbound federation are the actual bottleneck. Moving them to workers adds Redis and replication to a box that previously ran one process, so the gain has to be measurable before the change is made.

  • Split first: Usually a single pusher worker, because push delivery is the lightest move and easy to roll back.
  • Keep on the main process: Client traffic, event persistence, and the federation sender until you see outbound lag.
  • Before the change: Record current push latency and the main process CPU and memory under normal load, and confirm Redis is running and reachable.
  • After the change: Confirm notifications arrive on test devices and that the main process load drops as expected.
  • Watch for: Extra processes competing for the same small pool of CPU and memory, which can make a single host worse, not better.

Before committing to any split on one host, check that your Synapse version supports the worker options you plan to use and that you can roll back the configuration cleanly.

How to configure federation sender and pusher workers

This sequence moves outbound federation and push notification work off the main Synapse process, then restricts outbound federation to named workers so firewall rules can be applied to them.

  1. Confirm the worker baseline and Redis replication

    Confirm that the homeserver already runs with workers, that the main process and every worker connect to the same Redis instance, and that the replication listener is reachable only on the private network. Your team should check this against the workers documentation for the Synapse release you run, because the required listener and Redis settings are defined there. Done means every existing worker starts, appears as connected to Redis in its logs, and the main process reports replication without errors. If the baseline is not stable, stop here, since later steps add more processes to the same replication path.

  2. Define federation sender and pusher worker names

    Decide which worker processes will handle outbound federation and which will send push notifications, and give each one a unique worker name. Write a worker configuration file for each process using the worker_app and worker_name pattern described in the official workers docs, and confirm exact file names and keys there. Keep the sender and pusher workers separate from client and sync workers so their load and logs can be read on their own. Done means each worker file exists, names are unique, and a dry start of each process reads its config without a parse error.

  3. Register the workers in the main configuration

    Add the federation_sender_instances and pusher_instances settings to the shared homeserver configuration, listing the worker names from the previous step. These keys tell the main process to hand outbound federation transactions and push work to the named instances. Your team should confirm the exact value format in the configuration manual before editing. Done means the main configuration validates and the listed names match the worker files character for character.

  4. Set the outbound federation restriction

    Add outbound_federation_restricted_to with the names of the federation sender workers so that outbound federation is sent only from those processes. The setting was added in Synapse 1.89.0 and requires worker_replication_secret to be set, so confirm that the secret is configured in the shared config and that it is not stored in plain text in version control. This restriction is what lets firewall rules allow outbound federation from the sender hosts only. Done means the restriction and the replication secret are both present and the main configuration still validates.

  5. Align firewall rules with the sender hosts

    Work with the network team to permit outbound federation connections from the sender worker hosts and to block them from other hosts, using the federation port and delegation details in the federation docs. Confirm the port and destination rules from your own DNS and firewall policy rather than assuming defaults. Done means a test from a non-sender host cannot reach remote federation endpoints, while a test from a sender host can complete a federation request to a known remote server.

  6. Restart the workers and read their logs

    Restart the main process and each affected worker in the order your deployment method documents, then read each worker's log from startup through the first federation or push activity. Look for replication connection messages, configuration errors and any repeated retries to remote servers. Done means every sender and pusher worker starts cleanly, reports its role in the logs, and the main process no longer carries outbound federation or push traffic for those workers.

  7. Verify federation delivery and push

    Send a test message from a local user to a room with a remote member, then confirm that the message reaches the remote server and that the sender worker logs the outbound transaction. Send a test notification to a registered device and confirm the pusher worker logs the delivery attempt. Record the results and keep the worker logs for the change record. Done means both paths show delivery in the logs and the remote member receives the test message, with any failure traced to a worker name, firewall rule or secret.

Security risks in splitting outbound federation

Moving federation sending and push onto workers adds listeners, secrets and network paths that did not exist on a single process. The cards below cover the places where that split tends to widen exposure, and the control to check for each.

Replication listener exposure

Workers talk to the main process and to each other over a replication listener, and Redis relays that traffic. If this listener is reachable from outside the private network, any host that can connect may attempt to join replication. Confirm that the replication port is bound to a private interface and that firewall rules allow only the Synapse processes and Redis to reach it.

Synapse workers docs

Replication secret handling

The worker replication secret authenticates workers to the main process. A shared value copied into several config files, tickets or chat messages is hard to rotate and easy to leak. Store the value in your secrets manager, render it into each worker's configuration at deploy time, and check that it is absent from version control and logs. Outbound restriction depends on this secret being set.

Federation listener behind a firewall

The federation listener on port 8448 accepts inbound traffic from other servers. Synapse's own documentation recommends firewalling it, and a split deployment has more processes that might bind to it by mistake. Confirm which worker serves the federation listener, that it is reachable only as your federation design intends, and that other workers do not expose it.

Synapse federation docs

Outbound egress rules per worker

With outbound_federation_restricted_to, only named workers send federation traffic, which lets you give those hosts an egress rule and keep other workers off the public internet. This control needs a matching firewall policy. Without it, the restriction is a Synapse setting that does not stop a compromised worker from opening outbound connections. Write egress rules per worker role and test them from each host.

Configuration manual

Hosts that reach pusher endpoints

Pusher workers send notifications to push gateways outside your network, and any host that can reach their endpoints or the internal listeners they expose becomes part of the trust boundary. Inventory which hosts and services can connect to pusher instances, remove anything that is not a Synapse process or the required gateway, and review that list after each topology change.

Questions teams ask before splitting federation and push workers

What drives the cost of moving federation and push workers off the main Synapse process?

The cost depends mostly on how much of the deployment already runs as workers and how many people must change their configuration and sign off on it. Splitting out federation_sender_instances and pusher_instances is a configuration change, but it sits on top of Redis, a shared worker replication secret, reverse proxy routing and monitoring. Cost rises when the existing deployment is a single process with no Redis, when PostgreSQL needs tuning, or when firewall rules must be designed for outbound federation. Ask any quote to list each of these as a separate line, with what is one-time (design, first rollout, test evidence) and what recurs (upgrades, monitoring, on-call changes).

How long does a federation and pusher split take?

The duration depends on your starting point rather than on the two settings themselves. A deployment that already runs Redis and a generic worker with working replication can usually add dedicated sender and pusher processes in a shorter cycle than one that has never used workers. Time also goes to testing outbound federation from each worker, confirming that push notifications arrive on every client, and staging the change before production. Ask for a timeline that separates design, staging, cutover and a monitored stabilization period, and check that it states its assumptions about your current worker layout.

What does the internal team need to provide for this work?

The work needs access and decisions from several internal teams. Platform or systems engineers must be able to change the Synapse configuration and the reverse proxy routes, and they must be able to run Redis with a private listener. Database owners need to confirm the PostgreSQL connection limits, since each worker opens its own connections. Security must approve the worker replication secret handling and any changes to outbound firewall rules. Monitoring owners must grant access to metrics and logs for each worker so that a failed sender or pusher is visible within the normal alerting path.

Can an in-house team split federation and push workers without a partner?

Yes, a team with Synapse operations experience can make this change, and the documentation for workers and configuration describes the settings involved. The risk lies in the details that are easy to miss: keeping the replication listener off public networks, restricting outbound federation with outbound_federation_restricted_to only after checking that every required path still works, and confirming that rollback is possible given Synapse's upgrade notes. Teams without a recent worker deployment should test in a staging environment that mirrors federation and push traffic before changing production.

When should a team bring in an implementation partner for this change?

Bring in a partner when the change is part of a wider worker redesign, when the team lacks someone who can own Redis and replication in production, or when the deployment must pass an internal security or compliance review before go-live. A partner is also useful when the firewall design for outbound federation needs independent testing. DeployOpen plans, implements, hardens and documents self-hosted Matrix work inside your own infrastructure, and most engagements are fixed-scope, with scope and deliverables agreed in writing before work starts.

Does this work depend on Synapse Pro or ESS Pro?

No. Splitting federation and push workers is a configuration and architecture task that applies to community Synapse. Element's ESS Pro includes Synapse Pro, along with MAS, LDAP and SCIM integration and auditing, and it runs on Kubernetes with Helm charts. Choosing that route changes the deployment model and the support relationship, so it should be compared as a separate decision. Ask Element which of the worker settings are supported in the chosen product and how upgrades are handled, instead of assuming that the community configuration carries over.

What should a quote for this work include?

A useful quote lists the current deployment assumptions, the target worker layout, and the specific settings to be changed, including federation_sender_instances, pusher_instances and any outbound restriction. It should name the Redis and PostgreSQL work, the reverse proxy changes, the monitoring and alerting updates, and the staging and cutover steps. It should also state who performs each step, what the client must provide, how the rollback path is tested, and what happens after go-live. Ask for the Synapse version used as the baseline, since upgrade notes differ by release.

Operating federation and pusher workers after go-live

Once federation sender and pusher workers are running, the risk shifts from configuration to drift: backlogs build quietly, upgrades change behavior, and restores can bring back the wrong process layout. The cards below cover the checks that keep outbound federation and push delivery dependable over time, and they are the items to confirm with your own team before go-live is signed off.

Watch the federation backlog

Outbound federation is handled by the workers named in federation_sender_instances. Track how far queued federation traffic falls behind, using the metrics Synapse exposes and your monitoring stack. A growing backlog that does not drain after peak hours usually points to a sender worker that is undersized, unreachable through its firewall rule, or stuck on a remote server. Confirm which metrics your Synapse version exposes and set alerts on sustained growth, not single spikes.

Synapse workers docs

Monitor push delivery

Pusher workers listed in pusher_instances deliver notifications to push gateways. Delayed or missing notifications are often the first sign of a pusher problem, so check delivery latency and errors per worker rather than only the main process. Confirm that each pusher worker is reachable from the push gateways your clients use, and record which worker owns which pushers so an incident can be traced quickly.

Review logs after each upgrade

Each Synapse upgrade can change worker behavior, log formats and replication handling, so review the logs of every sender and pusher worker after restarting them. Look for repeated connection errors to Redis, federation send failures and worker startup warnings. Compare the first hours after the upgrade with a normal day, and keep the log review in your change record so the next upgrade has a baseline.

Read every upgrade note

Synapse publishes upgrade notes for each release, and they can list new required settings, removed options or platform floors that affect workers. Before moving to a new release, read the notes for every version between your current and target release, not only the latest. Confirm which worker options changed, and test the new release on a staging copy of the worker layout before production.

Synapse upgrade notes

Include worker configuration in restores

A restore of the database alone does not recreate the process layout that federation and push delivery depend on. Back up the homeserver configuration, the worker configuration files, and the settings that control outbound_federation_restricted_to and the worker replication secret. Rehearse a restore on a separate host and confirm that the restored workers start, reconnect to Redis and send federation traffic before you rely on the procedure.

How DeployOpen scopes and delivers Synapse worker work

DeployOpen plans and implements Synapse federation sender and pusher workers inside infrastructure you control, starting from a written scope that names the worker processes, routing rules and firewall boundaries. The work is delivered in stages with tests, documentation and a handover to your operators, and ongoing support is available as a retainer.

How we scope

  • Review your current homeserver configuration, federation policy and expected outbound traffic before agreeing on any worker layout.
  • Confirm which federation and push paths must leave the main process, and which hosts need outbound federation rights.
  • Agree deliverables, test cases and timelines in writing as part of a fixed-scope engagement before work begins.

How we build

  • Configure federation_sender_instances and pusher_instances on a staging copy of your Synapse deployment first.
  • Set up outbound_federation_restricted_to and the worker replication secret so only named workers send federation traffic.
  • Verify Redis replication, worker startup order and firewall rules on the federation listener before any production change.

How we hand over

  • Document the final worker map, configuration keys and the firewall rules that protect the federation listener.
  • Walk your platform and security teams through the test results, rollback steps and the upgrade notes that affect workers.
  • Deliver runbooks for adding or removing sender and pusher workers, so your operators can make later changes safely.

How we support

  • Retest federation sending and push delivery after Synapse upgrades, since worker settings can change between releases.
  • Review worker logs and push delivery issues with your operators when federation or notification problems appear.
  • Offer ongoing support, upgrades and continuous testing as a retainer, with scope agreed in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.