hashicorp / raft

Golang implementation of the Raft consensus protocol
Mozilla Public License 2.0
8.28k stars 997 forks source link

Questions about implementation #499

Open JoanFM opened 2 years ago

JoanFM commented 2 years ago

Hello team,

I have been reading a lot through the documentation and a little about the raft consensus protocol.

I think I am getting most of the concepts and abstractions but I still have some questions.

Is there a mechanism in raft or in this raft implementation that can handle cases where one of the ApplyEntries or FSM apply, or FSMSnapshot fails in one replica but not in the others? Or is the assumption that all replicas behave completely equivalent and functionally there is no way that one works and not the others? If this is handled, what is the mechanism to achieve so?

Is there always a need for an External client to register the Peers to all the rest? Should it come with a detailed configuration file which is updated when peers come and go? Is there a comprehensive documentation about this part of the algorithm and how to set things up?

Thank you very much,

dhyanio commented 1 week ago

@JoanFM for the second question

Another question is how to manage the starting of the different peers in the cluster?

here is the implementation https://github.com/dhyanio/discache/blob/main/rafter/raft.go#L144

FYI adding peers will be from config in future developments.