zhuxt2015 commented on issue #10874:
URL: 
https://github.com/apache/dolphinscheduler/issues/10874#issuecomment-1179764040

   ## leader选举
   1. master之间使用raft算法进行选举, 由raft算法保证不会出现脑裂的情况,  
[raft算法演示](http://thesecretlivesofdata.com/raft/#election)
   1. raft算法需要半数以上的节点存活才能保证集群继续运行。3个master最多宕机1个, 5个master节点最多宕机2个,依次类推。
   ## 监控及信息存储
   1. worker和follower将原来写入zookeeper的心跳信息(HeartBeat.class), 通过netty发送给leader节点, 
由leader节点保存在内存中
   2. follower周期从leader获取master和worker信息,保存在内存中, 并作为leader的热备
   3. Api Server从任意master节点获取master和worker的监控信息
   1. 如果leader超过一定时间没有收到worker和follower的心跳信息, 会将他们移至dead列表,方便进行容错处理 
   2. 如果worker节点存活着但是因各种原因master收不到worker的心跳, 那么worker依旧继续处理已经分配的任务, 
但是不会收到新的任务, 直到master重新收到worker的心跳。 
   1. 如果master存活少于半数, 则leader会通知所有剩余master自杀
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to