Physical Address
Mirpur,
Dhaka, Bangladesh
Physical Address
Mirpur,
Dhaka, Bangladesh

RAFT stands for Reliable, Replicated, and Fault-Tolerant. It is a consensus algorithm designed to achieve agreement on a value among a group of nodes(servers) in a distributed system, even in the presence of failures. It is a protocol for implementing distributed consensus.
Another way to state that Raft is a consensus algorithm that defines a leader election process to ensure that the system is always consistent. Using Raft’s election algorithm, a new leader is elected when the current leader fails or becomes unavailable. The leader election process in Raft is designed to be simple and efficient, making it a popular choice for many distributed systems.
1. Leader Election:
The leader-follower model is a very common distributed system design pattern in which one node is elected as the leader and the rest of the nodes are followers. The leader is responsible for coordinating the followers’ activities and ensuring that the group operates correctly. A new election begins when the system starts or the current leader fails. Servers compete for leadership by requesting votes from other servers.
The leader-follower model is used commonly in distributed databases (MongoDB), message brokers (Kafka, RabbitMQ, etc.), and distributed systems like Zookeeper.

Leader Election
In Raft, a split vote occurs when multiple candidates simultaneously become eligible for leadership and none of them secure a majority of votes in a single election. This typically happens when multiple nodes start their election phase at roughly the same time, potentially due to a leader crash or simultaneous election timeouts.

Split-vote

Log Replication
Each server applies the log entries to its state machine, ensuring that all servers maintain the same state.
In conclusion, Raft is a consensus algorithm that offers a practical and understandable way to build resilient and consistent distributed systems.