{
    "content": "<h1>Raft Consensus Algorithm<\/h1><p>The <a href=\"..\/Raft-Consensus-Algorithm\/\">Raft-Consensus-Algorithm<\/a> is a protocol designed to manage a replicated log in the context of <a href=\"..\/Distributed-Systems\/\">Distributed-Systems<\/a>. It was developed by <a href=\"..\/Diego-Ongaro\/\">Diego-Ongaro<\/a> and <a href=\"..\/John-Ousterhout\/\">John-Ousterhout<\/a> at <a href=\"..\/Stanford-University\/\">Stanford-University<\/a> as an alternative to the notoriously complex <a href=\"..\/Paxos\/\">Paxos<\/a> algorithm. The primary design goal of Raft is understandability, making it easier for engineers to build reliable systems like <a href=\"..\/Etcd\/\">Etcd<\/a> and <a href=\"..\/HashiCorp-Consul\/\">HashiCorp-Consul<\/a>.<\/p><h2>Operational Overview<\/h2><p>The algorithm functions by electing a distinguished leader which has complete responsibility for managing the replicated log. The leader accepts log entries from clients, replicates them on other servers, and tells the servers when it is safe to apply log entries to their state machines. To maintain <a href=\"..\/Fault-Tolerance\/\">Fault-Tolerance<\/a>, Raft decomposes the consensus problem into three relatively independent subproblems: <strong>Leader Election<\/strong>, <strong>Log Replication<\/strong>, and <strong>Safety<\/strong>.<\/p><p>In a typical <a href=\"..\/Cluster\/\">Cluster<\/a>, nodes can be in one of three states: Follower, Candidate, or Leader. Under normal operation, there is exactly one leader, and all other nodes are followers. If a follower receives no communication over a period called the election timeout, it becomes a candidate and initiates a new election to maintain <a href=\"..\/Availability\/\">Availability<\/a>.<\/p><p>Detailed specifications and proofs of correctness can be found in the original paper <a href=\"https:\/\/raft.github.io\/raft.pdf\">\"In Search of an Understandable Consensus Algorithm\"<\/a> or on the <a href=\"https:\/\/raft.github.io\/\">Official Raft Website<\/a>.<\/p><h2>Related Topics<\/h2><ul><li><a href=\"..\/Paxos\/\">Paxos<\/a><\/li><li><a href=\"..\/Distributed-Systems\/\">Distributed-Systems<\/a><\/li><li><a href=\"..\/Byzantine-Fault-Tolerance\/\">Byzantine-Fault-Tolerance<\/a><\/li><li><a href=\"..\/Zookeeper\/\">Zookeeper<\/a><\/li><\/ul>",
    "tags": [
        "raft",
        "consensus",
        "distributed-systems",
        "fault-tolerance",
        "replication",
        "leader-election",
        "paxos",
        "system-design",
        "backend",
        "etcd"
    ]
}