microservices
Circuit Breaker Pattern (Resilience4j).
Purpose:
Prevents a service from repeatedly trying to call a failing downstream service, which could lead to resource exhaustion (cascading failure).
States:
- CLOSED: Normal operation. Requests flow through.
- OPEN: Downstream service is failing. Requests are rejected immediately (Fast-Fail).
- HALF-OPEN: Periodically allows some requests to check if the downstream service has recovered.
Tooling:
Spring Boot typically uses Resilience4j (Hystrix is deprecated).