Closed mcgray closed 11 months ago
You can add frontends by alter system add observer
, then the frontends will serve as a observer which doesn't participate in the election.
This is not what I need actually. I need a nodes that would be able to become a leader.
My scenario. Having 3 FE nodes inside ASG. Terminating one. It becomes unavailable in 'SHOW FRONTENDS'. New one appears in the list and it is available and active (Follower). Next terminating another "old" node. It is being replaced with one. So I have Leader. Two active followers and two dead followers. That is it. I can no longer access the cluster. In case I am removing dead followers after each terminations - no issues. But I do not see the reason I should do that.
Hi @mcgray, thanks for reporting the issue.
By saying "Terminating one", you mean just terminate one FE process or the vm, right? I understand you want to replace the FE node one by one, but just terminating the FE process is not enough, because SR cannot identify the situation whether you want to replace that node or just that node have some fatal error, like vm crash, and later you want to recover it.
SR use a consensus algorithm to keep consistency between FE nodes and also process leader election. What you're doing is actually changing the membership of the consensus group. So you need to explicitly remove the original member from the group, that's the requirement of the consensus algorithm. For SR, that will be executing alter system drop follower "fe_host:edit_log_port";
before terminating the node.
Thank you for quick response @nshangyiming . I clearly understand that this is the way your consensus works. What is not clear for me is why you are using nodes that are not healthy/responding in your consensus group. Let me simply make a suggestion - can you remove dead nodes after certain time from this group?
I believe that not healthy nodes are part of the Raft Consensus Algorithm design because they can be healthy in the future. https://raft.github.io/
What we see currently is that in case we are terminating FEs one by one (say to apply updates to node/SR binary) in case we are NOT cleaning up dead nodes via "alter system drop follower" cluster becomes broken with error that leader cannot be established. We suggest to NOT include dead nodes in an election process.