用强化学习动态调整分布式系统超时,提升故障恢复速度
BALLAST: Bandit-Assisted Learning for Latency-Aware Stable Timeouts in Raft
- 用上下文感知的在线学习机制替代固定超时策略
- 在广域网极端延迟下,恢复时间减少超过40%
- 适合需要高可用性的分布式系统开发者
Raft协议中的随机选举超时机制虽简单有效,但在长尾延迟、抖动和网络分区恢复场景下容易因反复分裂投票导致服务不可用。本文提出BALLAST,一种轻量级在线自适应机制,将静态超时策略替换为基于上下文的多臂赌博机(contextual bandits)。它从离散的超时“臂”中选择,并采用高效的线性上下文赌博机(如LinUCB变体)进行学习,同时引入安全探索机制以限制不稳定时期的潜在风险。我们在包含长尾延迟、丢包、相关突发、节点异构性及分区/恢复波动的可复现离散事件仿真环境中评估了BALLAST。在挑战性广域网环境下,相比标准随机超时和常见启发式方法,BALLAST显著减少了恢复时间和不可写时间,而在稳定局域网与广域网环境中仍保持竞争力。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。