rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

Should need change broker role immediately when broker inactive?

Open zhengw0426 opened this issue 2 years ago • 1 comments

In a distributed environment, the network partitions always sad. If the master broker register to 3 nameserver nodes, sometimes it has a network partion probelm with the leader namesrv, but send heartbeat normally with other namesrv nodes. In such cases, we need change broker role immediately? Or should we check the broker status on other namesrvs? https://github.com/apache/rocketmq/blob/ce274265db8af73e28624ecc1fc98cc984658844/controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java#L106

zhengw0426 avatar Aug 09 '22 10:08 zhengw0426

@Stevenzall This is a good issue, How to solve the unnecessary handover jitter under the asymmetric network partition. In the current implementation, the broker role will be changed immediately if network partition occurs between the master broker and the leader controller. Do you are interested in proposing a more detailed plan to solve this problem?

RongtongJin avatar Aug 10 '22 01:08 RongtongJin

@RongtongJin I'm just starting to get familiar with the project. If I have a good idea, i will give a little proposing, really happy contributting to community.

zhengw0426 avatar Aug 11 '22 02:08 zhengw0426

This looks like an already well-defined case in terms of Paxos, Raft, and other well-known consensus algorithms.

lizhanhui avatar Aug 11 '22 02:08 lizhanhui

It is recommended to use raft for service discovery due to it enforces a stronger degree of coherency to reduce the number of states that must be considered.

lizhimins avatar Aug 22 '22 06:08 lizhimins

This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.

github-actions[bot] avatar Aug 23 '23 00:08 github-actions[bot]

This issue was closed because it has been inactive for 3 days since being marked as stale.

github-actions[bot] avatar Aug 27 '23 00:08 github-actions[bot]