Glossary

Circuit Breaker

Stop calling a failing dependency for a while so it can recover and you fail fast instead of piling up.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

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…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →