Definition
Stop calling a failing dependency for a while so it can recover and you fail fast instead of piling up.
How it works
After errors cross a threshold the breaker "opens" and requests fail immediately (or hit a fallback) instead of waiting on timeouts; after a cooldown it lets a trial request through to test recovery. Prevents one slow service from exhausting threads and cascading into a system-wide outage. Pair with timeouts, retries-with-backoff and bulkheads.
Common questions
What is Circuit Breaker?
Stop calling a failing dependency for a while so it can recover and you fail fast instead of piling up.
How does Circuit Breaker work?
After errors cross a threshold the breaker "opens" and requests fail immediately (or hit a fallback) instead of waiting on timeouts; after a cooldown it lets a trial request through to test recovery. Prevents one slow service from exhausting threads and cascading into a…
What is Circuit Breaker used for in system design?
After errors cross a threshold the breaker "opens" and requests fail immediately (or hit a fallback) instead of waiting on timeouts; after a cooldown it lets a trial request through to test recovery. Prevents one slow service from exhausting threads and cascading into a…