This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Remove the concept of worker "types" #10441
Labels
A-Workers
Problems related to running Synapse in Worker Mode (or replication)
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
We're currently midway through the process of fading out the concept of different types for a Synapse worker process. For example
synapse.app.pusher
,synapse.app.federation_sender
etc. While initially this provided a quick way to configure a worker to perform certain actions, it is also rather confusing and the inability to specify multiple types per worker can limit the flexibility of deployment.For instance, it's currently not possible to configure a worker to both send events to appservices (
synapse.app.appservice
) and update the user directory tables (synapse.app.user_dir
), as the functionality is forcefully disabled unless the worker is specifically marked as each respective type:synapse/synapse/app/generic_worker.py
Lines 433 to 463 in 85d237e
Instead, workers should be configured via worker file config options, so that one could simply set
notify_appservices: true
andupdate_user_directory: true
in the worker config to enable the worker to handle both sets of tasks.As many worker deployments currently rely on the
worker_type
configuration, a deprecation period is necessary. A rough plan for carrying this out could look like:worker_type
config option.worker_type
config option. All workers are now a "generic worker", though this term is no longer a necessary distinction.In the short term, the first step would allow for more immediate flexibility for medium-sized deployments - which need to move tasks off the main process, but don't have the resources to spin up a separate worker for each type.
Superseded worker types so far
synapse.app.appservice
Add thenotify_appservices_from_worker
configuration option (supersedingnotify_appservices
) to allow a generic worker to be designated as the worker to send traffic to Application Services. #12452synapse.app.user_dir
Add theupdate_user_directory_from_worker
configuration option (supersedingupdate_user_directory
) to allow a generic worker to be designated as the worker to update the user directory. #12654synapse.app.pusher
synapse.app.federation_sender
synapse.app.media_repository
synapse.app.frontend_proxy
The text was updated successfully, but these errors were encountered: