Table of Contents
Fetching ...

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

Qizhi Wang

TL;DR

...

Abstract

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.

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

TL;DR

...

Abstract

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.
Paper Structure (81 sections, 1 equation, 11 figures, 22 tables, 1 algorithm)

This paper contains 81 sections, 1 equation, 11 figures, 22 tables, 1 algorithm.

Figures (11)

  • Figure 1: Main scenario (30 seeds): mean recovery time with 95% CI. Lower is better.
  • Figure 2: Main scenario (30 seeds): unwritable fraction with 95% CI. Lower is better.
  • Figure 3: Main scenario: CDF of conditional election latency (time_to_leader).
  • Figure 4: Real etcd/raft prototype: mean recovery time (95% CI), main scenario.
  • Figure 5: Real etcd/raft prototype: unwritable fraction (95% CI), main scenario.
  • ...and 6 more figures