ShannonDing commented on issue #6468:
URL: https://github.com/apache/rocketmq/issues/6468#issuecomment-1484627768

   > I think it's a good idea to implement a health check endpoint on the 
broker side. Then the brokerIsActive is no longer check the heartbeat,but 
invoke the endpoint. the endpoint is as simple as the heartbeat, just return 
the status health or not. When elect the broker from the syncStateSet, it 
should also invoke it to check whether the broker is health before can be 
elelct as Master.
   > 
   > > At this point, the broker may reconnect quickly. Is it necessary to do a 
HA switching?
   > 
   > IMO, it't not neccssary. what more, The current controller has three 
places to trigger the election:
   > 
   > 1. The broker channel closed.
   > 2. The BrokerHeartbeatManager scanNotActiveBroker
   > 3. The DLedgerController scanInactiveMasterAndTriggerReelect.
   > 
   > I think just the scanInactiveMasterAndTriggerReelect is enough, In the 
current implementation, it is easy to have a concurrent election problem.
   
   In fact, what we hope is that when the master fails, re-election can be 
triggered timely and quickly to ensure a timely switchover between the master 
and slave nodes. However, we don't want to trigger frequent HA switches due to 
small jitters.
   Therefore, it is necessary to do regularly scanning node status actively and 
 do a passively trigger re-election by node abnormal events. What is important 
is that we may need to clarify the threshold and conditions for HA switch, as 
well as the timing for triggering re-election.


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