Circuit breakers
How the circuit breaker pattern stops one failing dependency from taking down a whole system: cascading failures, the closed, open and half-open states, thresholds and sliding windows, fallbacks, a working implementation, Resilience4j and service meshes, and how breakers combine with timeouts, retries and bulkheads.
CodexBash, , 5 min read
In a system of services, failures spread. A payment provider slows down; your checkout service waits on it; its threads and connections fill up; now checkout cannot answer anything, including requests that never needed payments; then the web front end, waiting on checkout, runs out of threads too. One slow dependency has taken down the whole site. The circuit breaker pattern, popularised by Michael Nygard's book Release It!, stops this chain reaction by detecting a failing dependency and failing fast instead of waiting on it, giving it time to recover. This article explains how breakers work and how to use them alongside other resilience patterns.
Sign in to read the rest
The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.