Search code examples
hyperledger-fabricraft

Forcing re-election in RAFT


I'm using Raft consensus, in hyperledger fabric, and I have some questions about how does it work.

  1. Once a Leader is elected, does the orderer stays a leader until he goes down ?

  2. Is it possible to force re-election process without restarting the leader container (docker restart orderer...) but with some options in the config block ( something like : ForceReElectionEvery: 60m ) ?

  3. What kind of information is exchanged between the orderers cluster ?

Thanks in advance.


Solution

    1. There is a new election launched by follower/s after an ElectionTick period without receiving messages from the leader. Take a look at https://hyperledger-fabric.readthedocs.io/en/release-1.4/raft_configuration.html#channel-configuration.

    2. As told in 1, a new leader election starts after ElectionTick without receiving messages from the leader. To modify ElectionTick once the channel has been created, you have to use configtxlator tool and update the channel, which is tedious.

    3. Basically consensus on the ordering of transactions in blocks and blocks in the channel's chain. For more information: https://hyperledger-fabric.readthedocs.io/en/release-1.4/orderer/ordering_service.html.

    Take into account that there is an independent Raft consensus process per channel. Each channel has its own leader and leader election process.