GuidesCircuit Breaker
Failure Handling
What counts as a failure?
- Infrastructure errors: 5xx, timeouts, DNS/network issues → trip the breaker
- 408 Request Timeout → trips the breaker (treated as an infrastructure timeout)
- 429 Too Many Requests → trips the breaker (treated as a backend capacity issue)
- Other 4xx business errors (400, 401, 403, 404, 422, etc.) → ignored, do not affect the breaker
Timeouts
A call that runs longer than the preset's timeout (20s for the default BALANCED preset) fails with a timeout error and counts as a failure. The timeout covers the whole call, including retries.
A timeout doesn't cancel the backend request
The breaker stops waiting, but the request to the backend keeps running and can still complete. For a write such as placeOrder, the storefront gets an error even though the backend may have committed the change.
Breaker states
- Closed — normal operation
- Open — integration temporarily blocked
- Half-open — testing if backend has recovered