CircuitBreaker

Fail-fast protection against cascading failures

Infrastructure · Primitives · bootstrap 0.11.0

Mechanism

State machine wrapper for fallible operations. Monitors failure rates of a target resource. States: (1) 'CLOSED': Requests pass normally. (2) 'OPEN': Requests fail immediately (Fail Fast) without invoking target. (3) 'HALF-OPEN': Limited trial requests allowed to test recovery. Transitions: 'CLOSED' -> 'OPEN' if failure count > threshold. 'OPEN' -> 'HALF-OPEN' after reset timeout. It wraps operations, switching to an open state on failure to prevent cascading overloads, while using Backoff and retry logic to schedule recovery probes.

Invariants

Parameters

Preconditions

Postconditions

Failure modes

Where this came from

—

Builds on

Used by

Related

Identity