{
  "slug": "raft",
  "term": "Raft",
  "aliases": [
    "Raft consensus"
  ],
  "definition": "Raft is a leader-based consensus algorithm that manages an ordered replicated log for a deterministic state machine.",
  "note": "For the paper's log-free read protocol, a leader first commits an entry from its own term, typically a no-op, to establish the committed prefix. This is a per-term prerequisite, not an entry per read. Quorum-confirmed reads need leadership evidence after the read begins; lease reads assume bounded clock skew. [raft-paper]\n\netcd v3.6.0 swaps read notifiers before requesting the next confirmed index. Readers holding the old notifier share one confirmation; readers capturing the new notifier after the swap wait for a subsequent round. [etcd-read]\n\nCommitment and application are separate. The linearizable-read path waits when the applied index is lower than the index confirmed for the matching request. Equality suffices for this application-progress check. [etcd-read]\n\nThe KV linearizability guarantee does not cover optional serializable reads or watches. Check each operation's API contract. [etcd-guarantees]\n\nA leader can commit then crash before replying; a retry can execute again. Section 8 tracks each client's latest command serial number and result so a recognized retry returns the previous response. Log agreement alone does not deduplicate client requests. [raft-paper]\n\nRIFL separately requires completion records and mutation effects to become durable atomically; this is not implied for every Raft service. [rifl]\n\nA latest-result slot is not a general concurrent-request design. For a live client, RIFL uses an acknowledged sequence prefix for reclamation; an earlier outstanding RPC can retain later results. [rifl]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "The paper assumes non-Byzantine behavior; arbitrary malicious participants are outside that model.",
      "citationIds": [
        "raft-paper"
      ]
    },
    {
      "text": "The etcd read check compares Raft log indices, not the API's KV revision. One modifying transaction advances the KV revision once across its changed keys; a transaction with no MVCC changes does not advance it. These counters are not interchangeable.",
      "citationIds": [
        "etcd-read",
        "etcd-mvcc"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-04",
  "related": [
    "raft-joint-consensus",
    "linearizability",
    "quorum-intersection",
    "write-ahead-log",
    "retry-deduplication",
    "flp-impossibility",
    "partial-synchrony"
  ],
  "citations": [
    {
      "id": "raft-paper",
      "title": "Ongaro and Ousterhout: In Search of an Understandable Consensus Algorithm, extended version (20 May 2014), sections 5.4, 6 and 8.",
      "url": "https://raft.github.io/raft.pdf",
      "accessed": "2026-11-04"
    },
    {
      "id": "etcd-read",
      "title": "etcd v3.6.0: Range, linearizableReadLoop and requestCurrentIndex",
      "url": "https://raw.githubusercontent.com/etcd-io/etcd/v3.6.0/server/etcdserver/v3_server.go",
      "accessed": "2026-11-04"
    },
    {
      "id": "etcd-guarantees",
      "title": "etcd v3.6: KV, watch and completion guarantees",
      "url": "https://etcd.io/docs/v3.6/learning/api_guarantees/",
      "accessed": "2026-11-04"
    },
    {
      "id": "hesela-consistency",
      "title": "Hesela: storage consistency, Raft commitment and read safety",
      "url": "https://hesela.com/analyses/storage-consistency-ordering/#raft-reads",
      "accessed": "2026-11-04"
    },
    {
      "id": "rifl",
      "title": "Lee et al.: Implementing Linearizability at Large Scale and Low Latency. SOSP 2015, Figure 2, sections 3-4.3; DOI 10.1145/2815400.2815416.",
      "url": "https://web.stanford.edu/~ouster/cgi-bin/papers/rifl.pdf",
      "accessed": "2026-11-04"
    },
    {
      "id": "etcd-mvcc",
      "title": "etcd v3.6.0: MVCC storeTxnWrite.End and put, revision advancement and per-key subrevisions",
      "url": "https://raw.githubusercontent.com/etcd-io/etcd/v3.6.0/server/storage/mvcc/kvstore_txn.go",
      "accessed": "2026-11-04"
    }
  ],
  "provenance": [
    "The algorithm definition follows the original extended paper; implementation details are scoped to etcd v3.6.0 source inspection. No cluster experiment or performance measurement was performed. [raft-paper] [etcd-read]"
  ]
}
