Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge two clusters into one #510

Open
anthonio9 opened this issue May 24, 2024 · 1 comment
Open

Merge two clusters into one #510

anthonio9 opened this issue May 24, 2024 · 1 comment

Comments

@anthonio9
Copy link

Hi,

RAFT seems to be what I need for a consensus leader election algorithm and your implementation fits my needs very well. I went through the examples, tried the echo_server one and have come up with some questions.
In a zero conf setup, what would be the best way of learning about other nodes?

This issue could be easily solved if RAFT clusters could merge. If two clusters are present, one with 3 nodes, the other with 5 nodes, is it possible for the leader of the latter cluster to add the first cluster leader with all of its followers to the latter cluster and therefore merging the two clusters into one cluster of 8 nodes?

I could not find anything about such scenario in your documentation except for the part which says that NuRaft implements Dynamic membership & configuration change - that may not be enough.

@greensky00
Copy link
Contributor

Hi @anthonio9

Merging two separate clusters is not doable. Such functionality is undefined due to possible state machine data conflict. Imagine cluster1 has key="a", value="x" and cluster2 has key="a", value="y", and how to resolve it is out of scope of Raft.

If what you want is simply letting members in cluster2 join cluster1 (and giving up the data that cluster2 has), 1) wiping out all data in state machine and log store and then 2) calling add_srv for each member one by one will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants