2 years ago

#11979

test-img

Egor Ovchinnikov

How do leader selection algorithms work in distributed systems?

for the sake of interest I decided to study the topic of distributed, high-loaded systems, read a couple of books, which wrote about replication and algorithms for selecting a new leader (Leader Election) in case of failure of the current one. In particular I learned about Bully algorithm, Modified Bully and Ring algorithms.

A couple of questions came up right away:

  • Absolutely all of these algorithms mention such a concept as priority. The node with the higher priority is assigned as the new leader. Is the priority a random number? Or does it usually depend on some node parameters, such as the amount of available memory, disk utilization, etc.
  • If the priority is a random number, then why do you need to poll each node and create such a long chain of requests? It's easy to do, when a node notices that the current leader has fallen off, it immediately sends a request to all other nodes either directly or to some bus, that it is now the leader. This will in fact be exactly the same random node, as in the case of priorities, only without a huge chain of requests.

algorithm

distributed

0 Answers

Your Answer

Accepted video resources