a6-recipe-circuit-breaker
Installation
SKILL.md
a6-recipe-circuit-breaker
Overview
A circuit breaker prevents cascading failures by detecting unhealthy upstream services and temporarily stopping requests to them. When the upstream returns too many errors, the circuit "opens" and APISIX returns errors immediately without forwarding requests. After a cooldown period, it "half-opens" to test if the upstream has recovered.
APISIX implements this via the api-breaker plugin, which tracks response
status codes and manages circuit state automatically.
When to Use
- Protect your API from cascading failures when an upstream goes down
- Automatically stop sending traffic to failing backends
- Allow failing services time to recover before retrying
- Return fast error responses instead of waiting for timeouts