# BALLAST: Bandit-Assisted Learning for Latency-Aware Stable Timeouts in Raft

arXiv: https://arxiv.org/abs/2512.21165 · HTML: https://mlsanity.com/paper/2512.21165/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 11 of its 26 references that are in the map.
- First posted on arXiv 24 Dec 2025.

## Builds on (most cited first, 11 of 11)

- [A New Algorithm for Non-stationary Contextual Bandits: Efficient, Optimal, and Parameter-free](https://mlsanity.com/paper/1902.00980/) (2019)
- [Conservative Contextual Linear Bandits](https://mlsanity.com/paper/1611.06426/) (2016)
- [Distributed Clustering of Linear Bandits in Peer to Peer Networks](https://mlsanity.com/paper/1604.07706/) (2016)
- [A Change-Detection based Framework for Piecewise-stationary Multi-Armed Bandit Problem](https://mlsanity.com/paper/1711.03539/) (2017)
- [Safe Exploration for Optimizing Contextual Bandits](https://mlsanity.com/paper/2002.00467/) (2020)
- [Distributed Contextual Linear Bandits with Minimax Optimal Communication Cost](https://mlsanity.com/paper/2205.13170/) (2022)
- [Performance Analysis of the Raft Consensus Algorithm for Private Blockchains](https://mlsanity.com/paper/1808.01081/) (2018)
- [WPaxos: Wide Area Network Flexible Consensus](https://mlsanity.com/paper/1703.08905/) (2017)
- [BFTBrain: Adaptive BFT Consensus with Reinforcement Learning](https://mlsanity.com/paper/2408.06432/) (2024)
- [From Theory to Practice with RAVEN-UCB: Addressing Non-Stationarity in Multi-Armed Bandits through Variance Adaptation](https://mlsanity.com/paper/2506.02933/) (2025)
- [Dynamic Tuning of Election Parameters for Timely Leader Failover in State Machine Replication](https://mlsanity.com/paper/2507.15154/) (2025)

## Abstract (arXiv)

Randomized election timeouts are a simple and effective liveness heuristic for Raft, but they become brittle under long-tail latency, jitter, and partition recovery, where repeated split votes can inflate unavailability. This paper presents BALLAST, a lightweight online adaptation mechanism that replaces static timeout heuristics with contextual bandits. BALLAST selects from a discrete set of timeout "arms" using efficient linear contextual bandits (LinUCB variants), and augments learning with safe exploration to cap risk during unstable periods. We evaluate BALLAST on a reproducible discrete-event simulation with long-tail delay, loss, correlated bursts, node heterogeneity, and partition/recovery turbulence. Across challenging WAN regimes, BALLAST substantially reduces recovery time and unwritable time compared to standard randomized timeouts and common heuristics, while remaining competitive on stable LAN/WAN settings.
