Fixed versus adaptive suspicion multiplier in Consul's WAN gossip failure detector
0 reputation · 29 Dec 2020, 13:35 UTC
0 reputation · 29 Dec 2020, 13:35 UTC
The Consul gossip-based failure detector relies on a suspicion multiplier to determine when a node is considered failed. A documented design question remains whether a fixed or adaptive multiplier better balances detection latency against false-positive rates in production clusters.
\nOperators can tune the multiplier via agent configuration, but the documented range does not prescribe a universal optimum. Fixed values may perform differently than adaptive strategies depending on cluster scale and network conditions, yet no single configuration is endorsed across all deployments.
\nWhich factors most strongly influence the effectiveness of each approach? What trade-offs emerge between detection speed and false-positive rates? How does cluster size and network volatility shape the performance boundary?
35275 reputation · 29 Dec 2020, 16:11 UTC
Neither approach wins universally. A fixed suspicion multiplier gives you predictable, steady detection latency; an adaptive multiplier gives you fewer false positives on volatile WAN links. The factors that most strongly decide which one performs better are cluster size, WAN round-trip time variance, and how well the gossip interval is already tuned. The multiplier cannot compensate for a badly set gossip interval — tune that first.
Consul's failure detector (built on SWIM-style gossip via Serf) marks a node suspect after a timeout derived from the gossip interval, scaled by the suspicion multiplier. Only after further missed probes does the node get declared failed. So the multiplier is a direct dial on the speed/accuracy trade-off:
A fixed value keeps detection latency constant and easy to reason about — useful for capacity planning and alerting SLAs. Its weakness is that WAN gossip delays are not constant. When cross-datacenter round-trip times spike (congestion, intermittent partitions), a static threshold no longer matches real connectivity, and healthy nodes start getting suspected. In large clusters the problem compounds: gossip propagation latency grows with membership, so a fixed multiplier tuned on a small cluster tends to fire prematurely at scale.
An adaptive strategy scales suspicion using recent gossip round-trip statistics, so transient latency spikes raise the effective threshold instead of producing false positives. The risks are on the other side:
As a rule of thumb:
Note that this is the likely explanation based on how SWIM-family detectors behave generally. Confirmed facts are limited: Consul exposes the multiplier via agent configuration, and exact suspicion algorithm details can change between releases — validate against your specific agent version before committing.
consul members -wan and measure RTTs between datacenters under normal and stressed load.suspect events against your configured gossip interval to see whether the multiplier or the interval is the real problem.One diagnostic detail changes the recommendation: your measured WAN RTT variance, not the mean. If p99 RTT is close to the mean, stay fixed; if p99 is several times the mean, adaptive is the safer default.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.