Backend Developer
mediumcircuit-breaker-pattern
What is the circuit breaker pattern and when do you use it?
Answer
A circuit breaker prevents repeated calls to a failing dependency.
**States:** closed (normal), open (fail fast), half-open (probe).
**Benefits:** protects resources, avoids cascading failures, improves recovery.
Use it for remote calls (HTTP/DB/queues) where failures can pile up and degrade the whole system.
Related Topics
ReliabilityArchitectureSystem Design