error rate Breaker

error rate

Trips when the ratio of errors to total requests exceeds a threshold.

How it works

Measures failure density. It normalizes error counts against traffic volume, allowing a fixed threshold (e.g., 5%) to remain valid regardless of traffic scale.

When to use

  • Detecting degraded service quality in variable-traffic environments.
  • Catching partial outages where a service is functional but unstable.
  • Monitoring success rate contracts.

When not to use

  • Extremely low-traffic endpoints where a single error skews results.
  • Binary health checks; use consecutive_failures for those.

State explanations

closed

Failure density is within acceptable bounds for the current traffic volume.

half open

Confirming if the service can handle a limited volume of requests without failure.

open

The proportion of failed requests indicates a systemic issue.