How does Multi-Raft group nodes together?

Viewed 177

I am trying to implement a similar architecture to Cockroachdb's multi-raft: https://www.cockroachlabs.com/blog/scaling-Raft/.

Does anyone have a brief explanation to how Multi-Raft group these individual Raft clusters? Specifically, is there a Raft instance coordinating the membership of the servers participating in each range/session/unit of smaller Raft units?

1 Answers

If I had to guess, they implement a logic similar to rendezvous hashing (or consistent hashing).

For example, there are 10 nodes total. And there is a range X. They could use hashing to decide what are those 3 nodes responsible for the range. One of those nodes will be the leader for a given range. And for other range, nodes will be different.

Since there are many more ranges than nodes, it means that every node will participate in multiple ranges. This is cool, as when a node sends a heart beat to a follower - that heart beat will confirm all ranges where a given node is a leader and the other node is a follower.

At the end of the day, still every node sends a heartbeat to every other node.

Related