0

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.

No name
  • 323
  • 4
  • 11

1 Answers1

1
  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.

kekomal
  • 2,179
  • 11
  • 12
  • I've used the following options: "options": { "election_tick": 10, "heartbeat_tick": 1, "max_inflight_blocks": 5, "snapshot_interval_size": 20971520, "tick_interval": "500ms" } I've been watching the logs of my orderers but I did not see the re-election process for now. And if my current leader goes rogue for a reason or another, my whole network will be in troubles, no ? – No name Mar 04 '20 at 15:44
  • Have you created any channel? – kekomal Mar 04 '20 at 15:58
  • Yes i have the sys channel and another channel "channel1" – No name Mar 04 '20 at 16:01
  • Here's an example of one of the orderers logs : https://imgur.com/J9AHrXV and as you can see from yesterday 2020-03-03 17:03:36.465 (when I launched the orderers) there is no new election. – No name Mar 04 '20 at 16:04
  • OK. While the follower keeps receiving any message from the leader, it seems that there is no new election. After an `ElectionTick` period without receiving messages, the follower/s launch the election process. I edit my answer. – kekomal Mar 04 '20 at 16:07
  • But, when your leader goes down (or looses connection) another one replaces it after the election. – kekomal Mar 04 '20 at 16:12
  • Yes, this works. I've tested it (docker stop orderer X and another orderer was elected as a leader) – No name Mar 04 '20 at 16:13