When does a single Synapse process need workers?
A single Synapse process should move to workers when measured symptoms show that the main process cannot keep up with its traffic, and not because a user count or a calendar date says so. The move is a real scaling step with its own cost: you add Redis, you change how the homeserver is routed and monitored, and you take on more moving parts to upgrade. Before committing, confirm the symptoms in your own environment, for example slow /sync responses, rising event send latency, or a main process that stays busy under normal load.
Synapse's workers documentation describes the design you would be adopting. The main process still owns some duties that cannot be split, and additional worker processes take over client, federation and event traffic. The generic worker handles that traffic, and the main process and every worker connect to Redis, which relays replication between them. Each worker therefore needs a shared Redis, a replication secret and a listener on a network that clients cannot reach. Ask your team to confirm which of these duties currently run on the main process, because that list determines which workers you need first.
Start by collecting baseline evidence for at least one normal business cycle: CPU and memory on the main process, PostgreSQL connection and query times, request latency for sync and send endpoints, and federation backlog. If the bottleneck is one request type, a targeted worker may solve it without a full split. If the main process is saturated across every request type, plan the Redis and routing work before you change production, and budget for testing a staging copy of the deployment. Ask your implementation partner or internal team to write down the rollback path, since Synapse upgrade notes warn that rolling back can be difficult after database schema changes.
Signs a monolithic Synapse has run out of room
A single Synapse process has a ceiling set by one CPU core for much of its event handling, one memory footprint and one queue of work. The symptoms below show up in different places, but they share a cause, so read them together. Each card names what to measure and what the pattern may point to, and the team should set its own baseline and thresholds from its own metrics before acting on any of them.
Sync and client request latency
Client calls to /sync, login and room state requests slow down as the main process handles more of them. Measure the request latency percentiles per endpoint over a normal week, and separate initial sync from incremental sync, since they load the server differently. A rising tail on incremental sync with stable database times usually points to the process itself, not the database. Compare against your own baseline before deciding anything.
Event persistence lag
Events take longer to reach the database and appear to other users. Watch the delay between an event being sent and being persisted, and the depth of the queue of events waiting for persistence. Sustained lag during busy rooms suggests the single writer is saturated. Check PostgreSQL wait times too, because a slow database can cause the same symptom and needs a different fix.
Outbound federation backlog
Events queued for other servers grow, and remote users report delayed messages from your domain. Track the outbound send queue length and the age of the oldest queued transaction for each destination. A backlog concentrated on a few busy destinations differs from a backlog spread across all of them, and the two lead to different remedies. Confirm the federation listener and outbound traffic are healthy first, since network limits can mimic this symptom.
Synapse federation docsPush notification delays
Mobile users receive notifications minutes late even though messages arrived on time for web clients. Measure the time from event persistence to push gateway submission, and track push failures returned by the gateway. Delay that grows with account count and room activity suggests the pusher work is competing with client traffic on the same process.
High main process CPU and memory
The main process shows sustained high CPU on one core while the host has idle capacity, and its resident memory climbs over days. Record CPU and memory per process over time, along with garbage collection activity if your monitoring exposes it. A single process pinned at one core while the machine is otherwise idle is the clearest sign that the workload has outgrown one process, and it should be confirmed against the other symptoms above.
Slow restarts and deploy windows
Restarts, upgrades and config changes take longer, and each one interrupts every user at once. Time the stop, start and first successful sync for your current process. As load grows, a single process means every release is a full outage for all clients, which is often the operational reason teams start planning workers. Confirm the timing with a rehearsal in a non-production environment, not from memory.
Which workers to add first
Client sync is usually the first pressure point on a busy homeserver. Long-polling /sync requests, initial syncs after login and large account activity keep the main process busy with work that is repeatable and can be spread across processes. Synapse handles this by routing selected client endpoints to generic workers, so the main process keeps the responsibilities that must stay single.
- Symptom to watch: slow client startup, delayed message arrival in large accounts, and high CPU on the main process during reconnect storms.
- First worker: a generic worker that receives client sync and login traffic through the reverse proxy.
- Routing: the proxy must send these endpoints to the right workers consistently, which is covered in the load balancing topic.
- Limits: the worker count depends on your user activity pattern, so measure sync latency before and after adding a worker.
- Dependencies: this move requires Redis for replication between processes, so budget for that setup before the change.
Check whether slow sync is caused by client reconnects, large accounts or a few heavy rooms before adding workers, because the fix differs.
Event persistence becomes the limit when the server writes more events than one writer can store in order. Symptoms include message send delays in busy rooms and growing replication lag between the main process and clients. Adding event persister workers through stream writers spreads this write load, but it changes how rooms map to processes and adds operational steps.
- Symptom to watch: send latency that rises with room activity, and lag in stream positions reported by monitoring.
- First step: confirm the bottleneck is writes, not reads, before adding stream writers.
- Sharding: rooms are assigned to persisters, and changing the set of writers restarts every worker.
- Database load: more writers raise PostgreSQL connection and write demand, so review pool sizing with your database team.
- Sibling topic: the stream writer sharding topic explains the configuration and restart behavior in detail.
Confirm the write bottleneck with metrics from your own server, and plan the change as a maintenance window because of the full restart.
Federation and push notifications both involve outbound work that can back up when many remote servers or devices need updates. A server that sends events to large numbers of remote homeservers, or that delivers many push notifications, can show queues that grow while local clients still look healthy. Moving these tasks off the main process isolates the outbound load.
- Symptom to watch: growing federation queues, delayed events on remote servers, and delayed mobile notifications.
- Federation sender: outbound federation can run on dedicated instances, which also makes firewall rules easier to define.
- Pusher: push delivery can run on its own instances so notification spikes do not slow client traffic.
- Network controls: restricting outbound federation to specific workers changes where outgoing connections originate, so review egress policy with your network team.
- Sibling topics: the federation sender and pusher topic covers
federation_sender_instancesandpusher_instancesin full.
Compare federation queue metrics with your push delivery logs to see which path is backing up before you assign workers.
Media uploads, downloads and thumbnailing can consume a large share of bandwidth, disk I/O and CPU on a server with active file sharing. Users often notice slow image loading or failed uploads before any chat latency appears. A dedicated media worker separates this traffic so it does not compete with message handling.
- Symptom to watch: slow media loads, thumbnail generation delays, and upload timeouts during peaks.
- Routes: client and federation media routes both need to reach the media worker, so check every route your proxy serves.
- Background job: media cleanup and similar jobs need a designated instance, which must be set deliberately.
- Storage: the choice of local disk or shared storage affects how multiple media workers see the same files.
- Sibling topic: the media repository worker topic covers the route list and storage options.
Review upload and download volumes per route before choosing this worker, since media problems can look like general slowness.
How the main process, workers and Redis fit together
The diagram starts at the reverse proxy, which receives client and federation traffic and sends each request type to a generic worker or to the main process. Every process, including the main process and all workers, connects to Redis, which relays replication between them, and to PostgreSQL, the shared database. Check that the replication listener and Redis sit on a private network, since the Synapse docs treat replication exposure as a risk. Confirm the routing rules for your own endpoints before you split traffic.
Traffic enters at the proxy, and all processes share Redis and PostgreSQL.
Options before and after the move to workers
This table compares five options a team can take before or alongside adding Synapse workers, with the change each one makes and the operator work it adds. Read it from the top down: the cheaper options are usually worth checking first, and the rows marked for workers only make sense once the main process is the proven limit.
| Option | When it fits | What it changes | Operator work it adds |
|---|---|---|---|
| Tune the single process | Load is moderate and a few settings, such as cache sizes or background update timing, have not been reviewed since install | Adjusts how one process uses memory and database connections without adding moving parts | Low: review config, measure before and after, and keep change notes for each release upgrade |
| Upgrade hardware | The single host is CPU or memory bound and the database runs on the same machine | Gives the one process more cores and RAM, which helps until one Python process stops scaling | Low to moderate: procurement or cloud resize, plus a maintenance window and new capacity monitoring |
| Dedicated PostgreSQL | Database load or disk latency is visible in slow query or lock metrics while the application process is not saturated | Moves database work to its own host so Synapse and PostgreSQL stop competing for resources | Moderate: backups, failover design, connection limits and PostgreSQL version floors to maintain |
| Move media storage off the host | Media uploads and downloads are filling local disk or slowing the same host that serves client traffic | Places the media store on separate storage, so disk growth no longer affects the homeserver host | Moderate: storage backend setup, backup scope for media, and checks that media paths stay consistent |
| Add workers | The main process stays saturated after tuning, the database is not the sole bottleneck, and sync or event traffic is clearly the limit | Splits request and background work across processes that share Redis-based replication | High: Redis to secure and monitor, request routing, per-worker metrics, and a restart plan for worker set changes |
How to plan and make the move safely
This sequence moves a running Synapse homeserver onto workers in controlled stages, so each change has a recorded baseline, a tested configuration and a rollback point before production traffic reaches it.
Capture the baseline before changing anything
Record current CPU, memory, database load, sync latency, event send times and error rates on the single Synapse process over a representative period, including peak hours. Your operations team owns this step, and the output is a dated baseline file that every later check compares against. Confirm you can read Synapse's metrics endpoint and that logs are retained long enough to cover the test window. The step is done when the team agrees which numbers will prove the move worked.
Check PostgreSQL and Python against the upgrade notes
Compare the PostgreSQL major version and the Python version on your hosts with the floors stated in the Synapse upgrade notes for your target release, which the Synapse documentation lists by version. Your platform team performs the check and plans any database or runtime upgrade as a separate change with its own backup. Also read every upgrade note between your current release and the target, because rollback can be difficult after schema changes. The step closes when the target version and its floors are written down and any gap has a scheduled fix.
Provision Redis on a private network with authentication
Deploy Redis on a network segment that only the Synapse main process and workers can reach, and enable authentication before any worker connects. Your infrastructure team sets the worker replication secret in the Synapse configuration and keeps the replication listener off public interfaces. Verify with a connection test from each host that will run a worker and a failed connection from outside the segment. The step is done when the Redis ping succeeds from every intended host and fails from everywhere else.
Define worker roles and routing rules
Decide which request types go to which worker, starting with the traffic that is slowing the main process in your baseline, such as sync, login, event sending and media. Write the worker configuration files and the reverse proxy routing map on paper first, so each endpoint has exactly one owner. Confirm the sticky routing requirements in the Synapse workers documentation for any endpoint that must stay on one worker. The step is done when every client and federation route in the design maps to one named worker or to the main process.
Stage the change in a test environment
Build a copy of production configuration and a recent database restore in a test environment, then start Redis, the main process and the planned workers there. Run scripted client sessions covering login, sync, message sending, room joins and media upload, and replay a sample of real federation traffic if your test network allows it. Rehearse the rollback by restoring the single-process configuration and confirming the server starts. The step is done when test results match the baseline within limits your team has agreed in writing.
Cut over the reverse proxy in a planned window
Apply the tested routing map to the production reverse proxy during an agreed maintenance window, keeping the single-process configuration ready to restore. Your operations team changes one listener or routing rule at a time and records the time of each change in the change log. Watch error rates and worker startup logs during the window, and keep the database backup from the baseline step accessible. The step is done when all production routes resolve to the intended workers and the rollback path has been tested once more.
Verify sync latency, replication and logs
Compare sync latency, event send times, replication lag and worker error logs against the baseline for at least one full daily peak. Check that every worker reports to Redis, that no request type falls back to the main process unexpectedly, and that federation traffic still flows. Your team signs off in writing, and any metric that regressed gets a named owner and a fix date. The step is done when the post-change dashboard shows the agreed targets met and the change record is closed.
What the move costs in Redis, PostgreSQL, routing and monitoring
The move to workers carries costs that a single-process Synapse never had, and most of them recur. The largest new component is Redis. Every worker and the main process connect to it, and it relays replication between them, so it becomes a service you must run, patch, back up or rebuild, and monitor for memory and connection health. Plan for the one-time work of standing it up and securing it (authentication, a private network path, and the replication secret), then budget for the ongoing work of keeping it available, since a Redis outage stalls every worker at once. Ask any partner quoting this work to separate the initial build from the continuing operation of Redis.
Configuration work is mostly one-time but touches every process. Each worker needs its own configuration file, a listener or replication entry, and a matching view of the shared settings, so a change to one value must be repeated consistently across the set. Proxy routing is the part that recurs. Sync, login and event-sending traffic must stay with the workers that hold the right state, so nginx or HAProxy rules must be reviewed whenever a worker type is added, moved or retired. Confirm how your team will test routing changes before they reach production, because a misrouted request can look like a client bug rather than a server fault.
Monitoring and upgrades are where costs compound over time. Each worker type needs its own dashboards and alerts, since a healthy main process can hide a stuck replication stream or a backed-up pusher. Upgrades also multiply: every process must run the same Synapse release, and the upgrade notes, which warn that rollback can be difficult because of schema changes, apply to the whole set. PostgreSQL usage rises with the number of processes, and the supported PostgreSQL floor for current releases, stated in the upgrade notes, may force a database upgrade alongside the move. Ask for a written estimate that lists the Redis, database, routing, dashboard and upgrade tasks separately, with the recurring operations named.
Security and operational risks of a worker deployment
Splitting Synapse into workers adds network paths, shared state and version coupling that a single process never had. The four cards below cover the controls to confirm before and after the move, so the extra capacity does not come with extra exposure.
Replication listener and Redis exposure
Workers talk to the main process and to each other through a replication listener, and Redis relays that traffic between processes. Anyone who can reach either can read or inject internal events. Confirm that the replication port and Redis are bound only to a private network segment, that Redis requires authentication, and that no security group or proxy rule exposes them to clients or federation peers. Check this from outside the network, not only in the config files.
Synapse workers docsMatching releases across every process
The main process and every worker must run the same Synapse release. A worker on a different version can fail in confusing ways or corrupt replication state, and it is easy to miss one container during a rolling change. Confirm that your deployment tooling pins one image or package version for all processes, and that a single upgrade step updates the main process and all workers together. Record the release in your change log for each host.
Rollback limits after schema changes
Synapse upgrade notes warn that rolling back can be difficult because database schema changes can land between releases. Adding workers multiplies the number of moving parts you must restore in order. Confirm that you take a verified PostgreSQL backup before every upgrade, that you have written a rollback decision point in advance, and that your team knows the restore procedure has been tested, not only documented.
Synapse upgrade notesAdmin and replication endpoints at the proxy
Worker routing puts many internal and administrative paths behind one reverse proxy. A rule that is too broad can expose admin APIs or replication endpoints to the internet, while a rule that is too narrow can break client or federation traffic. Confirm that admin paths are reachable only from management networks, that replication paths are never forwarded by the public proxy, and that federation runs on its own listener. Test each rule with requests from an external host and an internal host.
Questions teams ask before adding Synapse workers
How much effort does moving Synapse to workers take, and what drives it?
The effort depends mostly on how many processes you split out, how much of the current setup is documented, and whether you already run Redis and PostgreSQL in a way the workers can share. A move that only adds a generic worker behind a reverse proxy is much smaller than one that also separates stream writers, federation senders, media and background tasks. Each new process needs its own configuration file, a worker replication secret, a Redis connection, and routing rules at the proxy. Ask any partner for a written list of processes, the config changes on the main process, the proxy rules, and the monitoring you will add before they quote the work. Effort is usually one-time, while the Redis, PostgreSQL and monitoring costs recur.
Can one Synapse administrator move to workers without outside help?
One experienced administrator can do it if they are comfortable with Linux service management, reverse proxy configuration, PostgreSQL and Redis, and they have time to test each step. The risk is less the configuration itself and more the upgrade path, because Synapse release notes can require database changes and rolling back is not always simple. A single person also becomes the only point of failure for on-call response. Many teams therefore keep one person as owner and bring in outside help for a reviewed design, a staging rehearsal, or a second pair of eyes on routing. Decide this before the change starts, not during an incident.
What skills and tooling does the team need before starting the move?
Before you split any process, the team needs metrics that show where the main process is spending time, a staging environment that matches production closely enough to test routing, and people who can operate PostgreSQL and Redis. Without metrics you cannot tell whether a worker type will help. Without staging, the first test of sticky routing or replication happens on live users. Confirm these items with your own environment:
- Dashboards for request latency, database usage and event persistence lag on the current single process.
- A tested backup and restore path for PostgreSQL, plus a plan for Redis authentication and a private replication network.
- A rollback plan for each Synapse version you run, based on the upgrade notes.
How long does a cautious move to workers take?
The duration is set by the number of worker types you add, how many environments you test in, and how long you wait between steps to watch metrics. A cautious sequence usually adds one worker type at a time, observes it under real load, and only then adds the next. Each stage includes a change window, a check that clients still sync and send messages, and a rollback decision. Upgrades and PostgreSQL version floors can add time if your current versions are behind the minimums in the Synapse upgrade notes. Ask a partner for the stage list and the test criteria for each stage, and treat any fixed timeline that arrives before you have seen your metrics as a guess.
When should we consider Synapse Pro instead of hand-tuned workers?
Consider Synapse Pro when hand-tuning workers becomes a recurring project, when you need vendor support for a production homeserver, or when your requirements include features that Element sells with its server suite. Element's Element Server Suite Pro includes Synapse Pro along with Matrix Authentication Service, LDAP and SCIM integration and auditing, and it is intended for professional and government use. Compare the license and support cost with the internal time spent maintaining your own worker layout, and with the risk of a single operator. Synapse itself is AGPL-3.0 licensed, so community use and commercial licensing are different decisions. Check the current terms directly with Element before deciding.
Do workers change how our server behaves in federation?
Yes, federation traffic can be routed to different processes, so the federation listener and outbound sending need deliberate configuration. Synapse federates on port 8448 by default, and the federation listener must be reachable by other servers while your admin and replication endpoints stay private. Outbound federation can be moved to federation sender workers, which lets you restrict which processes make outgoing requests and apply firewall rules to them. The federation_domain_whitelist setting also limits which remote domains you talk to, and an empty list disables federation entirely. Test federation with a remote server after every routing change, since a misrouted request can look like a silent delivery problem.
Does adding workers change what we need to secure?
Adding workers adds more network paths that must stay private, so the security work grows along with the process count. The replication listener and Redis should sit on a private network, because anyone who reaches them can interfere with event flow between processes. Each worker exposes its own listeners, so review which endpoints each process serves and block anything that is not needed on public interfaces. Keep the worker replication secret and Redis credentials in your normal secrets store, and record the change in your access review. If your organization must show these controls to an assessor, ask a partner to document the network diagram and the listener map as part of the change, since those are the artifacts reviewers ask for first.
Where to read the official worker and upgrade documentation
Before you split a Synapse homeserver into workers, read three official sources in this order: the workers documentation, the upgrade notes and the configuration manual. The workers documentation in the Synapse workers docs explains the model the rest of this page depends on: the main process and every worker connect to Redis, which relays replication between them, and the generic worker handles client, federation and event traffic. Read it end to end, then map each worker type it names to a specific symptom you have measured, so you do not add processes for load you have not confirmed.
The Synapse upgrade notes are the document to read for every release between your current version and the target, not only the newest one. They warn that rolling back can be difficult because database schema changes between releases, so confirm your backup and restore procedure before any version change that comes with a worker change. The same notes list the PostgreSQL and Python versions each release requires and state that support is dropped when those versions reach upstream end of life. Check your platform floors against them early, because a PostgreSQL upgrade can block the work you planned.
The configuration manual documents each setting you will touch, including the worker-related options and the federation settings such as federation_domain_whitelist. Confirm the exact key names and defaults for your release in the manual rather than in older blog posts or forum answers, and keep a copy of the working configuration under version control so you can compare changes. Where a worker option is marked as single-instance, plan for it to run in exactly one process.
How DeployOpen scopes and delivers a Synapse worker move
DeployOpen plans and implements self-hosted Synapse changes inside your own infrastructure, starting from a written picture of where the single process is actually constrained. The work moves from scope to build, handover and ongoing support, with each step documented so your own team can run the result.
How we scope
- Review current Synapse version, PostgreSQL version and Python runtime against the upgrade notes before any worker design begins.
- Measure where the main process is saturated, including sync, event persistence, federation and media load, before choosing worker types.
- Agree in writing which worker types, Redis placement, routing and monitoring items are in scope, with deliverables and timelines.
- Confirm who in your organization owns the private network, Redis authentication and reverse proxy changes the move requires.
How we build
- Stand up Redis on a private network and configure the replication secret and listener so it stays unreachable from outside.
- Start the main process and first generic workers in a staging copy of your homeserver before touching production routing.
- Write nginx or HAProxy routing rules for /sync, login and event-sending endpoints, and test sticky behavior with real client sessions.
- Verify each worker type with its own health checks, log review and load test, and record the results for your change board.
How we hand over
- Deliver the worker configuration, routing files and Redis settings as version-controlled artifacts with a runbook.
- Document the restart procedure for adding or changing stream writer instances, since the set change restarts workers.
- Walk your platform and security engineers through rollback steps, noting that Synapse schema changes can make rollback difficult.
- Provide dashboards and alert definitions for worker health, replication lag and Redis availability for your monitoring stack.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Plan each Synapse upgrade against its upgrade notes, with worker configuration reviewed before the new release is rolled out.
- Retest routing, replication and authentication settings after infrastructure changes, such as load balancer or network updates.
- Confirm with DeployOpen which support model fits your team size and change cadence before the engagement begins.

