3 –Phase Leader Election
3 –Phase Leader Election
Abstract—Election plays a foremost part in distributed 2) Liveness Condition based on that every node will
systems. The reason behind the Election process in distributed eventually enter an elected or non- elected state.
system is to optimize in terms of load and improving the
efficiency of the system there by improving the process of
group communication. Choosing a node to be a leader in a
distributed environment is intricate. Over years, there are so
much of exploitations in the existing techniques such as ring
and bully but these algorithms could not able to provide an
appropriate solution in terms of message complexity. In this
paper, we proposed a novel method known as “3-Phase Leader
Election Algorithm” that consists of three phases. Firstly, it
identifies and filters the nodes for election. Secondly, the
filtered nodes are been validated for determination of prime
node via which the group communication takes place. Finally,
the Prime node will be identified and accepted in the
acceptance phase. Our approach is based on understanding the
complexity involved behind a message and improving the
efficiency of the system via following performance metrics such
as Time and Communication complexity.
the role of electing a leader in their own way that is suitable A. Bully Algorithm
for their information interchange. Paper [6], proposes a novel Garcia Molina in 1982 designed an election-based
approach of finding the leader using MAX-HEAPIFY () algorithm [1] and named it as bully. This algorithm uses a
procedure a part of heap tree method has been used. In [7], a Process ID for electing leader dynamically in a distributed
protocol that elects the local leader form subset or partition, computing environment. A leader process is elected based on
but it could able to solve the problem of communication the highest process ID of the system.
failures and also failed in electing a unique leader. In [8], it
maintains a global database about the necessary conditions of 1) Assumptions:
nodes to be a leader with an assumption the nodes uses a i. Every process of the system knows about the
reliable and asynchronous communication link. The authors other process “process ID” and is unique with
of this paper [9], tried to answer the problem by choosing a respect to each other.
prime node for a set of nodes with unique identifiers in a
ii. Processes are unaware of the status of the
fixed network within a reliable channel of communication. In
paper [10], the authors proposed an algorithm for election other processes.
based on candidate list in which they tried to reduce the iii. Process failure is based on timeouts and is
message passing in the process of election. But the algorithm synchronous with each other.
does not provide any clue of finding the next leader. In [11], iv. There may be chances of process failure even
the algorithm uses a system identification number (ID) to during execution of the algorithm.
order the list of candidates for election, and the leader is v. Time bound and reliable message delivery
elected from the available list. However the process does not
between processes.
provide any information regarding list maintenance cost.
Paper [12] is an enhancement of bully algorithm with fault
detection. This method detects crashed nodes at regular 2) Working Procedures:
intervals so that it can maintain current list of live nodes, but The objective of the bully algorithm is choosing a
it increased the message passing cost. A Consensus-Based process as a coordinator with an approval of other process of
Leader Election Algorithm [13] and Hierarchical Leader the system. On the other round, it is about electing the
Election Protocol Algorithm [14] that are been designed for process with highest Process-ID or highest priority. In case,
mobile ad hoc networks, where the former elects the leader Coordinator of the system fails, then the processes will
from preordered list however the algorithm does maintain the
immediately hold an election for choosing the leader. The
cost of the list and uses system ID for ordered list. The later
algorithm works in electing the leader by constructing a procedure is as follows:
backbone architecture on a clustered manet. Step1: Any process P of the system can initiate an election
procedure if it finds leader failure.
The ideology of this paper is to classify cluster heads into
backbone or leaf nodes through constructing a minimum i. This process P send an election message to those
spanning tree. The algorithm has two modes of operation process which has higher Process-IDs
hop-based and position based. There were also algorithms ii. If an acknowledgement or response is not reached
based on synchronous and asynchronous known as SEFA the initiated process P within the time bound then,
and AEFA [15] for electing leader in wireless ad hoc this process P will become the coordinator process
networks, SEFA based on security constraint and works in Step2: When a high priority process receives an election
hop-by-hop manner by choosing leader in each consecutive
hop by using a common evaluation function until it finalizes message from the initiated process P then:
the leader of the network. On the other hand, AEFA is a i. The high priority process sends an
non-secure election algorithm where the leader gets elected acknowledgement to the initiated process that it
based on the metric known as node weight value (NWV). will take over.
The node with highest NWV will be chosen as the leader. ii. Now, this high priority process holds an election to
However, these algorithms involve a large increase in its next higher process.
message and time complexity. There are also papers of
iii. The procedure will continue until it reaches the
electing leader in dynamic networks with lossy links [16-18].
Article [19], proposed a self-stabilizing leader election highest Priority-ID of the system.
algorithm with an approach of directed acyclic graph using iv. Finally, the new leader will announce itself as
TORA mechanism where the nodes will have partial coordinator of the system.
knowledge about the system and is mostly suitable for Step3: In case any other process which has higher priority-
MANETs. In [20], for anonymous and dynamic networks the ID in comparison with coordinator then again, the algorithm
method of choosing leader is based on time-varying runs.
communication graph with an assumption that network
remains connected over time. 3) Advantages:
The probability of detecting a failed process in
III. EXISTING PROTOCOLS Bully algorithm is lowered in contrast to other
algorithm which leads in lowering of traffic loads.
Several algorithms are being designed for electing leader
in distributed systems. In this section we describe the The process with high priority number can able to
classical election-based algorithms their assumptions of each detect the failure of the coordinator ad hence can
algorithm, working procedure, Advantages and be involved in the process of election.
disadvantages.
node in the system in order to gain the votes to declare 5. it will be announced as winner for coordinator.
themselves as coordinator. 6. Else if
7. Support received is also same then
8. Supported nodes priority will be summed and
the group with highest summed value nominator
will be declared as winner.
9. Else
10. Two nodes have the same priority id then
11. Voting count will be taken into consideration
and winner will be declared
12. End if
Algorithm
// To initiate voting:
1. Create message CRQ (sys-id, pri-id, voting-
count, visitors-id)
2. Send CRQ (sys-id, pri-id, voting-count, Fig: 4.4: Broadcasting CAM packets (Acceptance Phase)
visitors-id)
3. // upon receiving a message CRQ
4. If one node has highest voting then
D. 3PLE Procedure
1. Initialize the system
V. COMPLEXITY ANALYSIS
2. Phase1: Perform filtration of the nodes:
ER1: Configuration load In this section we have discussed the message and time
ER2: Configuration load complexity of the proposed algorithm.
ER3: Performance
A. Message Complexity
3. Compare each node in the system for the above
combinations and selected will be considered as Best case: In the best case, message will be created from
participants (Filtered Nodes (FN)) for the election. a high priority process which satisfies all the three rules of
4. Phase 2: Broadcast CRQ message packet in the election phase. This leads to message passing involves only
system n number messages to elect itself as a coordinator. Hence,
5. Send CRQ (sys-id, pri-id, voting-count, visitors-id) the message complexity in best case is O(n).
6. { Average case: As in average case, if more than one process
7. If (a node has the highest voting-count) then having the same priorities as like other the number of
8. It is elected as coordinator
required message passing to complete the process of
9. If (two nodes have the same voting-count) then
10. Supported nodes priority will be summed up to election is M, then M<2n. So, the complexity of message in
declare the coordinator average case is also O(n).
11. End if Worst case: The worst-case complexity is also O(n) since
12. Else the processes which initiates the election are filtered in the
13. Two nodes have the same priority then election phase only. Hence the message passing itself gets
14. Voting-count will be taken into consideration. reduced.
15. End else
16. End if B. Time Complexity
17. Phase 3: Broadcast CAM packet in the system The time complexity of the proposed algorithm is O(n).
18. Send CAM (sys-id, voting-count) The process which satisfies the phase-1 of the algorithm can
19. To declare coordinator. send the message to the remaining process in the system.
20. Exit. Each process identifies the coordinator from the CAM
message and hence it takes O(n).
E. Flowchart
VI. COMPARISON WITH OTHER ALGORITHMS [5] Amit Biswas and Animesh Dutta, “A Timer Based
In this segment of the paper, we tried to compare Leader Election Algorithm”, IEEE Conferences on
the performance of our proposed methodology for electing Ubiquitous Intelligence & Computing, Advanced and
Trusted Computing, Scalable Computing and
coordinator with respect to the bully and ring algorithm.
Communications, Cloud and Big Data Computing, Internet
[Table-II] show the required no. messages to elect leader for of People, and Smart World Congress
the algorithms both in best case and worst case. (UIC/ATC/ScalCom/CBDCom/IoP/SmartWorld), Toulouse,
France, July 18-21, 2016.
TABLE II. COMPARISON OF PROPOSED WITH BULLY AND RING
[15] Noman Mohammed, Hadi Otrok, Lingyu Wang, [21] WanFokkink and JunPang, “Simplifying Itai-Rodeh
Mourad Debbabi and Prabir Bhattacharya, “A Mechanism Leader Election for Anonymous Rings”, Electronic Notes in
Design-Based Multi-Leader Election Scheme for Intrusion Theoretical Computer Science, open access, Volume 128,
Detection in MANET”, IEEE Wireless Communications Issue 6, 23 May 2005, Pages 53-68..
and Networking Conference, Las Vegas, NV, USA, 31
March-3 April 2008. [22] S. Vasudevan ,B. DeCleene , N. Immerman , J. Kurose
and D. Towsley, “Leader Election Algorithms for Wireless
[16] Ahcène Bounceur, Madani Bezoui, Reinhardt Euler, Ad Hoc Networks”, Proceedings DARPA Information
Farid Lalem and Massinissa Lounis, “A Revised BROGO Survivability Conference and Exposition, Washington, DC,
Algorithm for Leader Election in Wireless Sensor and IoT USA, USA, April 22-24 2003.
Networks”, IEEE SENSORS, Glasgow, UK, 29 Oct.-1 Nov.
2017. [23] Navneet Malpani, Jennifer L. Welch and Nitin Vaidya,
“Leader Election Algorithms for Mobile Ad Hoe Network”,
[17] SukumarGhosh and ArobindaGupta, “An exercise in Proceeding DIALM '00 Proceedings of the 4th international
fault-containment: Self-stabilizing leader election”, workshop on Discrete algorithms and methods for mobile
Information Processing Letters, Volume 59, Issue 5, 9 computing and communications Pages 96-103, Boston,
September 1996, Pages 281-288. Massachusetts, USA — August 11 - 11, 2000.
[18] S. Vasudevan, J. Kurose and D. Towsley, “Design and [24] Israel Cidon and Osnat Mokryn, “Propagation and
Analysis of a Leader Election Algorithm for Mobile Ad Hoc Leader Election in a Multihop Broadcast Environment”,
Network”, Proceedings of the 12th IEEE International International Symposium on Distributed Computing, DISC
Conference on Network Protocols, 2004. ICNP 2004. 1998: Distributed Computing pp 104-118,
Berlin, Germany, Germany, Oct 8. 2004.
[25] Gang Zhang , Xiaoyan Kuang , Jing Chen and Yu
[19] Awadhesh Kumar Singh and Shantanu Sharma, “Elite Zhang ,” Design and Implementation of a Leader Election
Leader Finding Algorithm for MANETs”, 0th International Algorithm in Hierarchy Mobile Ad hoc Network”, 4th
Symposium on Parallel and Distributed Computing, Cluj International Conference on Computer Science &
Napoca, Romania, July 6-8 2011. Education, Nanning, China, July 25-28 2009.
[20] Tomasz Jurdzinski, Miroslaw Kutylowski, and Jan [26] Ahcene Bounceur, Madani Bezoui, Massinissa Lounis,
Zatopianski, “Efficient Algorithms for Leader Election in Reinhardt Euler and Ciprian Teodorov, “A New Dominating
Radio Networks”, Proceedings of the twenty-first annual Tree Routing Algorithm for Efficient Leader Election in IoT
symposium on Principles of distributed computing Networks”, 15th IEEE Annual Consumer Communications
Pages 51-57, Monterey, California — July 21 - 24, 2002. & Networking Conference (CCNC), Las Vegas, NV, USA,
Jan. 12-15 2018.