Course contentsShow
← System Design
Lesson 1050 of 1,91927. Circuit Breakers and BulkheadsFree lesson

State Transition Mechanics

Understanding the conditions and timing for transitioning between Closed, Open, and Half-Open states.

State Transition Mechanics

What you'll learn: How and when a circuit breaker moves between Closed, Open, and Half-Open states based on failure detection and recovery signals.


A circuit breaker doesn't just have three states—it needs clear rules for transitioning between them. Understanding these mechanics is crucial because poorly timed transitions can either fail to protect your system or unnecessarily block traffic.

Closed → Open Transition

The circuit moves from Closed to Open when failures exceed your configured threshold within a time window. For example, if 5 consecutive requests timeout, or if 50% of the last 100 requests fail, the breaker trips. This transition happens immediately upon threshold breach—no waiting, no second chances. The system has detected trouble and shields downstream services from further load.

Open → Half-Open Transition

After the circuit opens, it doesn't stay open forever. A timeout period (e.g., 30 seconds) begins. Once this cooldown expires, the breaker automatically transitions to Half-Open. Think of this as a "let's cautiously test the waters" state. The timer is crucial—too short and you retry before the service recovers; too long and you unnecessarily reject valid traffic.

Half-Open → Closed or Open

In Half-Open, the breaker allows a limited number of probe requests through (often just 1-3). If these succeed, trust is restored and the circuit returns to Closed. If they fail, the circuit immediately snaps back to Open, restarting the timeout period. There's no middle ground here—recovery must be clean.

The key insight: transitions are deterministic and automatic. No human intervention required. The breaker monitors failure thresholds, respects timeout windows, and probes for recovery independently.

Key Takeaway: Circuit breaker state transitions follow strict rules—threshold breaches trigger Open, timeout periods enable Half-Open testing, and probe results determine return to Closed or re-opening, all happening automatically based on observed system behavior.