These are chat archives for atomix/atomix
But IMO the idea of preferring leaders is in conflict with the Raft algorithm. Leader election is used in Raft to ensure safety, and strictly preferring leaders would make it unsafe. Raft's leader election algorithm is designed itself to prioritize nodes by whether or not they're up to date. So prioritizing leaders can only safely be done within the context of nodes that are up to date, which is constantly changing.
IMO thinking about changing the Raft election protocol to include preferences is the wrong way to think about it. Preferences in the leader election algorithm can necessarily only include a majority of the nodes in the cluster, because the election algorithm is designed to elect a leader from the majority. So what if the preferred leader is in the minority? But Raft has a mechanism for transferring leadership that can allow it to be transferred to any node. So, the right way to prefer specific leaders IMO would be by using leadership transfer, periodically checking leadership and availability and transfer leadership to specific nodes by priority. This is basically what we're planning to do in our own project (ONOS).