# Overview of Raft Algorithm #flashcard A consensus algorithm that uses [[Total Order Broadcast]]. Raft builds a distributed log that enables [[Linearizability]]. <!--ID: 1751507777834--> # Key Considerations ## Election Process #flashcard The election process works well because: - Protects against electing multiple leaders due to quorums - Old leaders cannot come back due to fencing token / epoch number - Leader has up to date log and can backfill stale nodes <!--ID: 1751507777836--> ![[Raft 2025-02-04 08.54.24.excalidraw.svg]] %%[[Raft 2025-02-04 08.54.24.excalidraw.md|🖋 Edit in Excalidraw]]%% ![[Raft 2025-02-04 09.02.01.excalidraw.svg]] %%[[Raft 2025-02-04 09.02.01.excalidraw.md|🖋 Edit in Excalidraw]]%% ## Writes Process Write backfill logs: - there is only one leader per term - Successful writes must make log fully up-to-date. ![[2025-02-04_Raft-1.png]] # Pros - Create fault-tolerant, linearizable storage # Cons - Slow performance due to single leader being a bottleneck - Does not replace 2-phase commit # Use Cases - Used to create a [[distributed log]] # Related Topics