element-hq / element-hq/synapse
Remove restrictions on routing `/messages` requests to workers
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#11717](https://github.com/matrix-org/synapse/issues/11717).
---
From [workers.md](https://github.com/matrix-org/synapse/blob/develop/docs/workers.md#available-worker-applications):
> Pagination requests can also be handled, but all requests for a given room must be routed to the same instance. Additionally, care must be taken to ensure that the purge history admin API is not used while pagination requests for the room are in flight
This is to ensure that multiple `/backfill` requests don't happen for the same room concurrently, and that we don't cause confusion by backfilling content that is currently being purged.
To relax this requirement we would need to replace the in-process locks with cross-process locks. We have some such basic locks already for the federation inbound event queues that we could probably reuse
Contributor guide
Assessment
This issue has not been assessed yet.