From 76e13f820061aed36f5af31b94c92462177ac6e2 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 2 Feb 2026 15:59:00 +0200 Subject: [PATCH] Add native Sliding Sync (MSC3575) endpoint to worker routing The /_matrix/client/unstable/org.matrix.simplified_msc3575/sync endpoint can be handled by generic workers, but Synapse's workers.md documentation doesn't mention it. The code confirms it's worker-compatible: - SlidingSyncRestServlet is registered via sync.register_servlets: https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/rest/client/sync.py#L1128-L1131 - sync.register_servlets is NOT in the worker exclusion list: https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/rest/__init__.py#L180-L194 - GenericWorkerStore includes SlidingSyncStore: https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/app/generic_worker.py#L168 This adds the endpoint to both: - matrix_synapse_workers_sync_worker_client_server_endpoints (for specialized sync workers with sticky routing) - matrix_synapse_workers_generic_worker_endpoints (documenting generic worker capability) --- roles/custom/matrix-synapse/vars/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/custom/matrix-synapse/vars/main.yml b/roles/custom/matrix-synapse/vars/main.yml index 8843c0600..55943645b 100644 --- a/roles/custom/matrix-synapse/vars/main.yml +++ b/roles/custom/matrix-synapse/vars/main.yml @@ -26,6 +26,8 @@ matrix_synapse_workers_room_worker_federation_endpoints: # Sync workers handle /sync and the (now deprecated) related endpoints matrix_synapse_workers_sync_worker_client_server_endpoints: - ^/_matrix/client/(api/v1|r0|v3|unstable)/(sync|events|initialSync|rooms/[^/]+/initialSync)$ + # Native Sliding Sync (MSC3575) - supported on generic workers since Synapse 1.114 + - ^/_matrix/client/unstable/org.matrix.simplified_msc3575/sync$ # Client reader workers handle generic client-server endpoints that don't contain a roomid or sync matrix_synapse_workers_client_reader_client_server_endpoints: @@ -149,6 +151,8 @@ matrix_synapse_workers_generic_worker_endpoints: - ^/_matrix/client/(api/v1|r0|v3)/events$ - ^/_matrix/client/(api/v1|r0|v3)/initialSync$ - ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ + # Native Sliding Sync (MSC3575) - supported since Synapse 1.114 + - ^/_matrix/client/unstable/org.matrix.simplified_msc3575/sync$ # Federation requests - ^/_matrix/federation/v1/event/