consecutive failures Breaker

consecutive failures

Trips after a specific number of failures occur sequentially.

How it works

Monitors sequential failure counts, ignoring time windows to focus on the string of events. This is the fastest method for detecting a hard service outage.

When to use

  • Critical external API dependencies.
  • Database connection health checks.
  • Logic where a single success should reset the failure counter.

When not to use

  • Noisy environments where intermittent expected errors are frequent.

State explanations

closed

No sustained failure streak detected.

half open

Waiting for a successful request to confirm recovery.

open

The service has failed sequentially enough to indicate an outage.