Linearizable local reads in Raft require valid leader authority and the necessary committed state to be applied.
Being the leader is insufficient
A disconnected former leader may not know that a new leader exists. Reading only its local data can omit writes that have already completed. Reads therefore require safety conditions beyond the write path.
Ongaro and Ousterhout's Raft paper requires two checks. A new leader commits an entry from its current term to establish committed state. Before reading, it contacts a majority to confirm its authority. The state machine must also have applied the committed position required by the read.
| Path | Evidence checked | Remaining cost |
|---|---|---|
| Quorum-confirmed read | Current leader authority and committed position | Network confirmation and application wait |
| Valid lease read | Exclusive authority within a time interval | Timing assumptions and lease renewal |
| Unvalidated replica read | The replica's local state | Insufficient freshness guarantees |
The assumptions a lease adds
A lease grants authority for a limited interval. A lease read replaces per-request quorum communication with a timing condition. While the leader considers its lease valid, another leader must not complete conflicting writes that make its reads stale.
Comparing timestamps across nodes differs from measuring elapsed time. Check whether the protocol bounds clock offset, clock drift, or message delay. Installing NTP does not establish the required bound.
flowchart TD
R[Read request] --> L{Protocol lease conditions hold}
L -->|No| Q[Confirm authority and commit position with quorum]
L -->|Yes| A[Confirm required log application]
Q --> A
A --> V[Read from the permitted state]
This diagram identifies verification boundaries rather than implementing a particular library. Whether response-based lease timing or a long execution pause is safe depends on the protocol's proof and ordering rules.
During a leader change
If an old lease might remain valid, a new leader cannot immediately allow operations that conflict with that authority. Measure this delay separately from steady-state read latency. A longer lease can increase both the local-read interval and failover cost.
The SoCC 2014 Paxos Quorum Leases paper extends leases from one leader to a replica set. Local reads at several replicas require coordinating writes with lease-holder state. This result does not automatically apply to a general Raft implementation.
| Scenario | Result to verify |
|---|---|
| Former leader becomes disconnected | No successful stale read after a newer write |
| Immediately after election | Establish commit state and lease-transfer conditions before reading |
| Delayed log application | Distinguish committed entries from entries already applied |
| Clock or process disruption | Detect and safely handle violations of the protocol's timing assumptions |
Selection and verification
Consider the read share, client locations, and failover objective together. Quorum confirmation is a baseline when the lease's timing assumptions cannot be guaranteed. This is a judgment about required guarantees, not a ranking inferred from a recent implementation benchmark.
Measure read latency both in steady state and during leader changes. Fault injection should include former-leader responses, delayed application, and timing conditions. This post makes no claim about current defects or fixes in particular product versions.
Summary
Linearizable Raft reads require valid leader authority and the necessary committed state. Leases can reduce communication while adding timing assumptions and transition rules. Measure their steady-state benefit separately from failover delays. Verify these conditions in the chosen implementation and its fault-test histories.