Circuit breaker
Circuit breaker is a control mechanism designed to prevent cascading failure in complex systems by interrupting the flow of requests or operations when a failure threshold is exceeded. Originating in electrical engineering — where a physical breaker trips when current exceeds a safe level — the concept has been generalized across software engineering, distributed systems, finance, and organizational design. The core principle is identical in every domain: detect abnormal conditions, interrupt the propagation path, and provide a graceful degradation path.
The circuit breaker is a form of variety attenuation: it reduces the variety of failure modes that a downstream system must handle by collapsing many possible error conditions into a single, manageable state. Instead of processing every malformed request, every timeout, every resource exhaustion event, the downstream system sees only 'circuit open' — a binary signal that triggers a predefined fallback. The complexity of failure is absorbed at the boundary.
The Three States
A circuit breaker operates through three distinct states:
Closed. In the closed state, requests flow through normally. The breaker monitors for failure indicators — error rates, latency thresholds, timeout frequency. If the failure rate remains below the threshold, the breaker does nothing. This is the default, steady-state mode.
Open. When the failure threshold is exceeded, the breaker trips into the open state. All subsequent requests are immediately rejected — no attempt is made to execute them. The downstream system is protected from the overload that caused the failure, and the failing upstream system is given time to recover without additional pressure. The open state is a deliberate act of information loss: the breaker discards the information about whether any particular request would have succeeded, in exchange for the survival of the system as a whole.
Half-Open. After a configurable timeout, the breaker transitions to the half-open state. A limited number of test requests are allowed through to probe whether the upstream system has recovered. If these requests succeed, the breaker closes. If they fail, the breaker returns to open. The half-open state is the system's dead letter office: a channel for signals that do not fit the current filter but might fit a future one.
Applications Beyond Software
The circuit breaker pattern generalizes far beyond its origins in electrical engineering and software distributed systems.
In financial markets, trading halts function as circuit breakers. When price volatility exceeds a threshold, trading is suspended to prevent panic-driven cascades. The New York Stock Exchange's circuit breakers — triggered at 7%, 13%, and 20% intraday declines — are direct analogues of the software pattern. The market is protected from its own feedback dynamics: falling prices trigger selling, which triggers more falling prices. The breaker interrupts the loop.
In organizational design, escalation thresholds serve a similar function. A front-line manager has authority to resolve disputes up to a certain cost threshold; beyond that, the circuit breaks and the dispute escalates to a higher level. The organization attenuates the variety of decisions that reach the executive level by filtering them through hierarchical breakers.
In epidemiology, lockdowns and quarantine measures are societal circuit breakers. When transmission rates exceed healthcare capacity, the circuit opens: social contact is interrupted, the propagation path is broken, and the system is given time to recover. The cost is enormous — economic, social, psychological — but the alternative is cascading system failure.
The Design Tension
Circuit breakers embody a fundamental tension in systems design: the tradeoff between availability and consistency. An open circuit preserves the downstream system but denies service to legitimate requests. A closed circuit provides full service but risks propagation of failure. The half-open state is an attempt to split the difference, but it introduces its own risks: probe traffic during recovery can itself trigger a renewed failure.
The threshold settings are not derivable from first principles. They depend on the stakes of failure, the cost of denial, and the recovery characteristics of the upstream system. A breaker set too sensitively produces false positives — unnecessary service denial. A breaker set too leniently produces false negatives — failure propagation that the breaker was designed to prevent. The calibration problem is identical to the information loss budget problem in variety attenuation: how much signal can you discard without losing information you need?
The most sophisticated circuit breaker architectures do not use global thresholds. They use adaptive breakers that adjust their sensitivity based on historical patterns, load characteristics, and the specific failure mode detected. This is variety amplification applied to the breaker itself: instead of a fixed attenuation mechanism, the system maintains a portfolio of breaker configurations and selects among them based on context.
The circuit breaker is often misunderstood as a safety mechanism. It is not. It is an information mechanism — a device that decides, under uncertainty, which signals to process and which to discard. Every breaker is a theory about what kinds of failure are recoverable and what kinds are not. And like every theory, it is wrong about some cases. The question is whether it is wrong in the direction of survival.