A circuit breaker opens after repeated remote failures and rejects further calls quickly. After a wait it enters a half-open state and allows a small probe to test recovery.
The demo cycles through closed, open, and half-open routes. Failure thresholds and recovery delays need tuning for the service.
When to use
Use it when an unstable remote dependency could cascade delay to callers.