Skip to content

BreakerStrategy

BreakerStrategy = { threshold: number; type: "consecutive"; } | { duration: number; minimumRps?: number; threshold: number; type: "sampling"; } | { minimumNumberOfCalls?: number; size: number; threshold: number; type: "count"; }

Defined in: packages/pipeline-resilience/src/interfaces/resilience-options.interface.ts:94

Circuit breaker strategy controlling when the circuit opens.

{ threshold: number; type: "consecutive"; }

Open after threshold consecutive failures.


{ duration: number; minimumRps?: number; threshold: number; type: "sampling"; }

Open when the failure proportion exceeds threshold (0–1) within a rolling duration (ms) window. minimumRps avoids tripping under low load.


{ minimumNumberOfCalls?: number; size: number; threshold: number; type: "count"; }

Open when the failure proportion exceeds threshold (0–1) over the last size calls (count-based sliding window).