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

Shard master process. #6677

@erikjohnston

Description

@erikjohnston

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.

Metadata

Metadata

Assignees

Labels

A-WorkersProblems related to running Synapse in Worker Mode (or replication)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions