Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Shard master process. #6677

Closed
erikjohnston opened this issue Jan 10, 2020 · 3 comments
Closed

Shard master process. #6677

erikjohnston opened this issue Jan 10, 2020 · 3 comments
Assignees
Labels
A-Workers Problems related to running Synapse in Worker Mode (or replication)

Comments

@erikjohnston
Copy link
Member

Currently we have a single master process which can quickly become a bottleneck, so we want to be able to run multiple "master" nodes and scale horizontally.

Some notes:

  • We have a concept of "streams" that are a sequence of items assigned a monotonically increasing ID, where there is a "max position" which guarentees that every item with an ID below that has been successfully persisted (even though some items with a higher ID may have been persisted).
  • Replication between nodes is currently a fairly noddy TCP protocol where all nodes connect to the master process and get streamed updates. This approach will not work in a world where we have multiple "master" nodes.

Potential approaches:

  • Move as much as possible onto workers, but retain a single "master" process that does nothing but orchestrate e.g. tracking max pos of streams, streaming updates to workers
  • Use an external process, e.g. redis, rabbitmq, etc to manage these things for us.
@djschilling
Copy link

If there are steps in this direction please also consider not only performance, but high availability.

So a single master process would not be ideal in my eyes.

See also this issue i opened with focus on ha: #7076

@anoadragon453
Copy link
Member

@djschilling The point of this project is to run more than one master process.

That said, ensuring the whole thing doesn't fall over if 2/3 aren't running would be great.

@erikjohnston
Copy link
Member Author

Synapse now supports moving writing of events to a different process. I've opened #7593 to track further work.

@richvdh richvdh added the A-Workers Problems related to running Synapse in Worker Mode (or replication) label Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Workers Problems related to running Synapse in Worker Mode (or replication)
Projects
None yet
Development

No branches or pull requests

5 participants