circuit_breaker

Rejects requests to clusters whose circuit is open.
On this page

Rejects requests to clusters whose circuit is open.

Configuration Notes

Each configured cluster has an independent circuit breaker state machine. Clusters not listed in the config are unaffected (pass-through).

When consecutive upstream failures reach the threshold, the circuit opens and subsequent requests receive 503 immediately. After the recovery window, a single probe request is forwarded; if it succeeds the circuit closes.

Configuration

FieldTypeRequiredDescription
clustersClusterCircuitBreakerConfig[]yesPer-cluster circuit breaker settings.
clusters[].namestringyesCluster name (must match a cluster in the load balancer).
clusters[].consecutive_failuresintegeryesNumber of consecutive upstream failures before the circuit trips to Open.
clusters[].half_open_timeout_secsintegernoSeconds a Half-Open probe may remain in-flight before the circuit resets to Open and starts a new recovery cycle. Prevents indefinite stall when a probe request is dropped without a response. Defaults to 30 seconds.
clusters[].recovery_window_secsintegeryesSeconds the circuit stays Open before transitioning to Half-Open.

Example

filter: circuit_breaker
clusters:
  - name: backend
    consecutive_failures: 5
    recovery_window_secs: 30