Multiple leader ipfs on cluster nodes?

Hi, It is possible to add multiple leader node on ipfs-cluster (like ipfs) ?

I think the actual answer is no, isn’t it ?

ipfs has no concept of leader. Cluster has a concept of leader but only internally. I think the answer is no but I’m not sure if the question is the right one. What problem are you trying to solve?

I think I used the wrong word, in ipfs when adding a new node, we set a list of bootstrap nodes. If one of this nodes goes offline the others are still here and can do theirs jobs.

When we use ipfs cluster we can bootstrap to only one node : the leader.
(I perhaps misunderstood what I read.)
So if there is only one leader node for the cluster, if it goes offline, the ipfs-cluster can’t share to the ipfs node the new added content. If the leader can’t be restarted, a new one need to be created to again share the datas.
The new leader need to be added to all existing cluster nodes, which is quite difficult if there are a lots of nodes.

That’s why I’m asking if it’s possible to bootstrap to multiples nodes in ipfs-cluster.

You can bootstrap to multiple nodes (the --bootstrap flag takes a list of multiaddresses), and those nodes do not need to be the Raft leader. A bootstrapping peer will try each peer in the list until one succeeds.

Raft elects a leader among cluster peers, and when the leader goes offline a new one is elected (as long as there is a majority of peers online).

Thanks for the explanation !
So, the elected leader is chosen among all the connected nodes and not between the “bootstrap” ipfs cluster nodes.

correct. And you can use any peer to bootstrap.

1 Like