You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "runzhiwang (Jira)" <ji...@apache.org> on 2020/07/03 10:22:00 UTC

[jira] [Comment Edited] (RATIS-800) Make Ratis consume recommended leader host from the pipeline creator

    [ https://issues.apache.org/jira/browse/RATIS-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17150915#comment-17150915 ] 

runzhiwang edited comment on RATIS-800 at 7/3/20, 10:21 AM:
------------------------------------------------------------

1. Add (selfPriority, targetPriority) to each group member,  the member can trigger a leader election if selfPriority > targetPriority.  For example, when init group,
  we can set the suggested leader with (targetPriority + 100, targetPriority), and the two follower with (targetPriority - 100, targetPriority) and (targetPriority - 200, targetPriority),  so only the suggested leader can trigger leader election and will be elected as a leader.
2.  But if the leader crash, two follower can not trigger leader election because  selfPriority < targetPriority. To address this, if follower can not trigger leader election,  and after a time threshold, there is no leader was elected, follower will decrease it's targetPriority at a fix rate such as 20% until selfPriority > targetPriority.
3.  After cluster run a long time, leader election happen a lot of times, maybe leader is not balance among datanode, so we need to re-balance leader by force change leader to some datanode with low load. For example, datanode1 is a leader of  group1 and group2, we can change the leader of group2 from datanode1 to datanode2 by ask datanode2 trigger a election.

[~szetszwo][~ljain][~msingh][~shashikant] Could you help review this proposal ? Thank you very much.


was (Author: yjxxtd):
1. Add (selfPriority, targetPriority) to each group member,  the member can trigger a leader election if selfPriority > targetPriority.  For example, when init group,
  we can set the suggested leader with (targetPriority + 100, targetPriority), and the two follower with (targetPriority - 100, targetPriority) and (targetPriority - 200, targetPriority),  so only the suggested leader can trigger leader election and will be elected as a leader.
2.  But if the leader crash, two follower can not trigger leader election because  selfPriority < targetPriority. To address this, if follower can not trigger leader election,  and after a time threshold, there is no leader was elected, follower will decrease it's targetPriority at a fix rate such as 20% until selfPriority > targetPriority.
3.  After cluster run a long time, leader election happen a lot of times, maybe leader is not balance among datanode, so we need to re-balance leader by force change leader to some datanode with low load. For example, datanode1 is a leader of  group1 and group2, we can change the leader of group2 to datanode2 by ask datanode2 trigger a election.

[~szetszwo][~ljain][~msingh][~shashikant] Could you help review this proposal ? Thank you very much.

> Make Ratis consume recommended leader host from the pipeline creator
> --------------------------------------------------------------------
>
>                 Key: RATIS-800
>                 URL: https://issues.apache.org/jira/browse/RATIS-800
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Li Cheng
>            Assignee: runzhiwang
>            Priority: Critical
>
> Start a Jira for suggested leader sematics. It would help Ratis performance if it can consume the leader host which its upstream user like Ozone recommends. User can choose the leader host based on load balance and rack awareness. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)