← All Tools

Circuit Breaker Pattern Simulator

Watch the Closed → Open → Half-Open state machine of the classic Michael Nygard circuit breaker pattern. Tune the failure threshold, the recovery probe count, and the reset timeout, then send simulated requests — or just let the auto-driver pull a slider through good and bad upstream behavior. See which requests pass, which fail, and which get rejected by an open breaker.

Breaker config

Consecutive failures before opening
Consecutive successes to close again
How long to stay open before probing
Sets the upstream's simulated error rate

State machine

CLOSED
Requests flow through. Counting failures.
OPEN
All requests rejected fast. Waiting for reset timer.
HALF-OPEN
Limited probes. Success closes, failure re-opens.
State
CLOSED
Consec fail
0
Consec succ
0
Reset in
Total ok
0
Total fail
0
Total rejected
0

Recent requests

Event log

Copy as config


How it works

Originally laid out by Michael Nygard in Release It! (2007), the circuit breaker wraps a remote call so an upstream outage doesn't cascade into your own service melting down under doomed retries. In the Closed state every call goes through and failures are counted. After N consecutive failures the breaker flips to Open and starts rejecting calls instantly — the upstream gets a chance to recover and your threads stop piling up waiting on dead connections. After a cooldown the breaker enters Half-Open and lets a tiny number of probe requests through. If they succeed, the breaker closes; if they fail, it snaps back open and the cooldown timer starts again. Tune the failure threshold to match your normal error rate plus headroom, and pick a reset timeout shorter than your user's patience but longer than the typical upstream blip.