Skip to content

Warmup

The adaptive threshold needs a reference for “healthy” latency. fluxgo captures it at startup during the warmup period.

  • Warmup lasts WarmupDuration (30 s by default). Set it to 0 to skip warmup.
  • While IsWarmingUp is true, the circuit behaves like a static breaker, so cold-start traffic cannot cause a false trip.
  • At the end, the baselines Sbase and Pbase are stored and the adaptive threshold takes over.

A baseline captured while the dependency is already failing would be useless, so a capture is only accepted when the failure rate during warmup stays at or below WarmupMaxFailRate (5% by default).

if cb.Snapshot().IsWarmingUp {
// still on the static threshold; baselines are not set yet
}