Consensus indicates that several servers agree on the same information, which is required for designing fault-tolerant distributed systems. Consensus algorithms enable a group of computers to function as a coherent entity that can withstand the failures of some of its members. RAFT protocol helps in achieving consensus.
In this project I implemented the two major task involved in RAFT algorithms
As per RAFT algorithm each node in a cluster can exist in three states, namely Leader, Candidate and Follower. The below flow diagram explains the transition of nodes into different states.
For implementing succesful Leader Election, I incorporated below mentioned mechanism on each node
Please check this file to see more information on the Leader Election Implementation
Implemented Safe Log Replication along with modified Leader Election algorithm to ensure only a candidate with complete log must get elected as leader. The below flow diagram explains the log replication process.
Implementing of safe log replication involves implementation of following mechanism
Please check this file to see more information on the Safe Log Replication Implementation
Please check the demo video of the implementation here