Anti-flapping
A threshold that moves with latency can hover around the failure rate and flip the circuit repeatedly. fluxgo prevents this with a minimum dwell time.
After any state transition, the circuit cannot trip from Closed to Open again
until MinDwellTime has elapsed (5 s by default).
cfg := fluxgo.DefaultConfig()cfg.MinDwellTime = 10 * time.SecondTrade-off
Section titled “Trade-off”Setting it to 0 disables the guard. Detection becomes as fast as the signals
allow, at the cost of possible oscillation when the failure rate hovers around
θₜ.
Related settings
Section titled “Related settings”| Field | Role |
|---|---|
RecoveryTimeout | How long the circuit stays Open before probing (Half-Open) |
HalfOpenMaxRequests | How many probe requests are admitted while Half-Open |
MinRequests | Outcomes needed in the window before a failure rate is evaluated |