Practice this topic in a realistic system design interview
Remote calls fail in ways local function calls do not. Another service can return errors, time out, reject extra requests, or become so slow that callers run out of threads and connections while waiting.
The dangerous part is how the failure spreads. Callers wait, resources fill up, retries add more traffic, and the slowdown reaches services that were otherwise healthy.
The Circuit Breaker pattern wraps a risky operation and decides whether calls should be attempted. When too many calls fail or become too slow, the breaker opens and rejects new calls quickly. Later, it allows a few test calls to see whether the dependency has recovered.
The pattern does not make a broken dependency healthy. It protects the caller, gives the dependency room to recover, and makes fallback behavior planned instead of accidental.
This chapter covers how circuit breakers work, their states, and how to choose practical settings.
Loading simulation...