Package version:

Interface CircuitBreakerPolicy

Policy that defines circuit breaker conditions

interface CircuitBreakerPolicy {
    consecutiveErrors?: number;
    intervalInSeconds?: number;
    maxEjectionPercent?: number;
}

Properties

consecutiveErrors?: number

Number of consecutive errors before the circuit breaker opens

intervalInSeconds?: number

The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.

maxEjectionPercent?: number

Maximum percentage of hosts that will be ejected after failure threshold has been met