Storage-Triggered Leader Step-Down in a Raft-Based Key-Value Store
Local storage degradation can delay a Raft leader sufficiently to missheartbeats and lose leadership, a phenomenon that etcd and TiKV documentoperationally. We present a mechanism that couples an LSM-tree storageengine to a Raft state machine through a single atomic storage-healthsignal. When an exponentially weighted moving average of SSTable flushlatency crosses a threshold, the storage engine publishes a one-bitdegradation event. The Raft tick thread consumes that event on its nextiteration and executes a leader step-down under the same mutex thatguards every other Raft transition. We evaluate the mechanism on a3-node localhost cluster under injected fsync latency. Under 100-500 msof injected latency, the tripwire preserves 15-40% of warmup throughputfor the duration of the fault, while an otherwise identical clusterwithout the tripwire drops to 0.1-5%. The tripwire fires 118-267 msbefore Raft's natural election timeout in every trial where it fires;at 500 ms it fires in two of three trials. A separate SIGKILL experimentconfirms zero loss of acknowledged writes across four independentmid-compaction fault injections.
Authors
- Salman Khan
- Zahid Hassan
Institutions
- Islamia College University (PK)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-26
- DOI
- https://doi.org/10.5281/zenodo.22976935
- Primary Topic
- Advanced Data Storage Technologies
- Type
- preprint