Definition
A circuit breaker is a resilience pattern that watches calls to a downstream service and, after an error threshold trips, "opens": further calls fail immediately instead of waiting on timeouts. This frees the caller's threads and connection pools and stops retry traffic from hammering a service that is already down — the mechanism behind preventing one failing dependency from cascading into a site-wide outage.
After a cooldown the breaker goes half-open, letting a few probe requests through; if they succeed it closes and normal traffic resumes. The breaker pairs with a fallback decision: fail fast with an error, serve a cached/default response, or degrade the feature. Blind retries with no breaker are the anti-pattern it exists to prevent.
How it comes up in interviews
This is the expected answer to "service B is down — what does service A do?" Interviewers listen for failing fast (not queuing timeouts), the half-open recovery probe, and a stated fallback behavior. Pairing it with exponential backoff and timeouts shows production experience.