element-hq / element-hq/synapse
Add support for real high availability - make the main synapse process literally redundant
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
**Description:**
There are tons of old, closed issues which discuss, but it seems real HA was never achieved for synapse. I'd like to re-raise this issue, because a lot of progress has been made in synapse and maybe achieving real HA is not such a big issue anymore.
**Goal**
Remove the single point of failure, allow synapse to be deployed in redundant, active active (or self controlled active-passive) mode. Processes should accept requests from clients without relying on a single process, writing to the database should be possible from multiple processes.
**Scope**
This ticket only discusses the synapse related side. It does not discuss scaling redis or postgresql, which can already be done on its own.
**Recap / other resources**
* Last issue that discusses HA, but focuses on redis: https://github.com/element-hq/synapse/issues/16984
* (old, closed) issue that fixes "hot spare" claim in the documentation: https://github.com/matrix-org/synapse/issues/7076
* (old, closed) issue discussing sharding the writes, closed, but still no real HA: https://github.com/matrix-org/synapse/issues/6677
* (old, closed) follow up issue on 6677 discussing sharding of the master process, but no final solution: https://github.com/matrix-org/synapse/issues/7593
* "only one process can write for a specific stream" documentation, basically confirming the single point of failure state https://github.com/matrix-org/synapse/blob/develop/docs/workers.md#stream-writers
Pinging @richvdh as he was very much involved in most of the older issues.
Contributor guide
Assessment
This issue has not been assessed yet.