Circuit breaker pattern
A fault-isolation pattern that temporarily interrupts operations when monitored failures or unsafe conditions meet a defined criterion, limiting cascading effects and allowing recovery checks.
Spring Microservices in Action
The circuit breaker pattern prevents repeated calls to a failing or slow remote service by interrupting calls when a failure threshold is reached.
- How it is used
- Protects microservice clients from slow or failing remote resources and cascading resource exhaustion.
- How deep it goes
- Explains call interruption and failure thresholds, then demonstrates Hystrix annotations, configuration, and isolation tradeoffs.
- Examples
- Uses a cascading service slowdown and a licensing database lookup to illustrate the breaker.
- What you can do after
- Apply it via Spring Cloud and Netflix Hystrix to protect and tune remote calls.
Read how Spring Microservices in Action explains circuit breaker pattern →
The Art of Code
A circuit breaker is a fault-tolerance pattern that temporarily stops calls to an failing dependency after repeated failures and later permits limited recovery attempts.
- How it is used
- Protects a failing remote dependency from repeated calls while the application handles its unavailability.
- How deep it goes
- Explains opening and recovery behavior and walks through a configurable failure threshold and waiting period.
- Examples
- Demonstrates a Java payment-service breaker with a 50% failure threshold and a five-call window.
- What you can do after
- Apply it via Resilience4J to configure a breaker around a service call.
Microservices Patterns, Second Edition
A circuit breaker pattern stops calls to a failing dependency for a period and later permits test calls to determine whether it has recovered.
- How it is used
- Protects synchronous service callers from cascading downstream failures and high latency.
- How deep it goes
- Explains threshold-driven state transitions and recovery tests, and illustrates annotated implementation without detailing configuration values.
- Examples
- Illustrates an order endpoint returning empty or cached delivery information when a provider is unavailable.
- What you can do after
- Apply it via Resilience4j annotations on a Spring Boot client proxy.
Read how Microservices Patterns, Second Edition explains circuit breaker pattern →
Grokking Software Architecture
A circuit breaker is a resilience pattern that temporarily prevents calls to a failing dependency to limit cascading failures.
- How it is used
- Uses a circuit breaker to prevent downstream outages from cascading into the calling application.
- How deep it goes
- Explains failure thresholds and all three state transitions, including a cooldown and test request.
- Examples
- Illustrates an unavailable payment API at checkout and a retry loop that amplifies a brief delay.
- What you can do after
- Evaluate and understand how a circuit breaker limits cascading failures and tests for recovery.
Read how Grokking Software Architecture explains circuit breaker pattern →
gRPC Microservices in Go
A circuit breaker is a fault-tolerance pattern that temporarily stops calls to a failing dependency to prevent cascading failures.
- How it is used
- Protects interservice calls from repeated attempts against a failing dependency and helps prevent cascading failures.
- How deep it goes
- Explains state transitions and configuration, then implements a Go breaker around a gRPC call and in a client interceptor.
- Examples
- Uses an order-creation gRPC call, a failure-ratio setting, state-change logging, and a unary client interceptor.
- What you can do after
- Apply it via sony/gobreaker to protect Go gRPC client calls and configure when failures open or reset the circuit.
Read how gRPC Microservices in Go explains circuit breaker pattern →
Google Anthos in Action
A circuit breaker is a distributed-systems fault-isolation mechanism that temporarily stops requests to an failing or unavailable service.
- How it is used
- Uses circuit breaking to preserve microservice availability and functionality during failures, timeouts, overload, or external-service downtime.
- How deep it goes
- Explains the purpose, failure sources, traffic redirection, and service-mesh placement, but does not detail thresholds or state transitions.
- Examples
- Uses an Istio Ingress request to Service A, two Pods, an unreachable Pod, and alternate-service traffic redirection.
- What you can do after
- Operate circuit breaking through Anthos Service Mesh to isolate failing service paths and limit user-visible disruption.
Read how Google Anthos in Action explains circuit breaker pattern →
Python Concurrency with asyncio
A circuit breaker pattern is a fault-tolerance pattern that stops sending requests to a failing or slow service and resumes requests after a configured reset condition.
- How it is used
- Protects backend-for-frontend services from repeated delays and failures in downstream microservices.
- How deep it goes
- Explains closed, open, and half-open states, then implements a simplified asynchronous breaker with configurable thresholds and timing.
- Examples
- Demonstrates slow cart calls, an inventory callback, repeated breaker requests, and a reset after five seconds.
- What you can do after
- Build it from scratch with asyncio, configure failure and reset thresholds, and apply it to asynchronous service requests.
Read how Python Concurrency with asyncio explains circuit breaker pattern →
Architecting for Autonomy
A runtime control that stops or limits calls to a failing or dangerous operation to prevent cascading harm.
- How it is used
- Uses runtime controls to constrain autonomous operations before failures or dangerous decisions cascade through production systems.
- How deep it goes
- Defines operational placement and companion safeguards, but stops short of implementation algorithms or configuration procedures.
- Examples
- Uses poisoned threat-intelligence data, mass account freezing, blocked payments, repeated retries, and unavailable services as failure scenarios.
- What you can do after
- Operate/configure runtime boundaries that halt dangerous autonomous calls and distinguish prevention from recovery.
Read how Architecting for Autonomy explains circuit breaker pattern →
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
A circuit breaker is a resilience pattern that stops requests to a failing upstream service and resumes them after checking that the service has recovered.
- How it is used
- Protects microservices by stopping calls to failing upstream services and failing new requests immediately.
- How deep it goes
- Explains On and Off states, recovery checks, and configurable delays, but stops short of implementation details.
- Examples
- Uses a failed HTTP request to a particular resource, immediate subsequent failures, and a delayed upstream recovery check.
- What you can do after
- Evaluate/understand when state-based fast failure can protect a service from a failing upstream dependency.
Clean Applications with Hexagonal Architecture
A resilience pattern that temporarily blocks calls to an unresponsive dependency and permits limited probes to determine when it has recovered.
- How it is used
- Bounds the availability cost of synchronous calls to dependencies that stop responding.
- How deep it goes
- Defines thresholds, open-state rejection, cooldown probes, and success or failure transitions without detailing implementation mechanics.
- Examples
- Uses author-service validation during article approval to show when dependency failure must block work.
- What you can do after
- Configure a breaker to reject calls during outages and probe recovery after a cooldown.
Read how Clean Applications with Hexagonal Architecture explains circuit breaker pattern →
AI Governance
A circuit breaker is a control that stops automated processing when monitored conditions indicate an abnormal or unsafe state.
- How it is used
- Stops automated processing when resource costs or aggregate safety signals indicate abnormal conditions.
- How deep it goes
- Pairs runtime monitoring with automated pauses and fallback responses, without prescribing breaker mechanics or threshold values.
- Examples
- Uses runaway agent loops, denial-of-wallet risks, flagged-output spikes, retries, and tool calls as monitored cases.
- What you can do after
- Operate automated systems with cost or safety triggers that pause execution and route cases to human processing.
Secure APIs
A circuit breaker pattern prevents repeated calls to an unhealthy dependency and returns a controlled result when that dependency fails or responds unexpectedly.
- How it is used
- Protects applications that consume internal services or third-party APIs from dependency failures and malformed responses.
- How deep it goes
- Defines proxy-based health monitoring and controlled errors, but does not detail circuit states or implementation code.
- Examples
- Uses unavailable or malformed third-party API responses and an outbound proxy that returns a useful error.
- What you can do after
- Apply it by monitoring dependencies, returning controlled errors, degrading gracefully, and validating consumed responses.
Designing AI Systems
A circuit breaker is a resilience pattern that temporarily stops calls to a repeatedly failing dependency and later tests whether it has recovered.
- How it is used
- Protects managed tool execution from cascading failures caused by consistently failing external systems.
- How deep it goes
- Defines a three-state machine and implementation parameters, but omits the internal failure-history and recovery algorithms.
- Examples
- Uses a per-tool Python CircuitBreaker interface with admission checks, recovery probes, and result recording.
- What you can do after
- Operate/configure tool execution with failure thresholds, recovery timeouts, and limited half-open test requests.
Read how Designing AI Systems explains circuit breaker pattern →
Vibe Engineering
A circuit breaker is a resilience pattern that automatically stops or rejects operations when failure or degraded quality exceeds a threshold.
- How it is used
- Protects headless-agent pipelines by stopping operations when output quality degrades.
- How deep it goes
- Defines the operational role of circuit breakers but stops short of specifying thresholds or implementation mechanics.
- Examples
- Uses agent pipelines, broken builds, incorrect reports, security incidents, and sampled outputs as operational examples.
- What you can do after
- Operate automated pipelines that contain degraded outputs before they create downstream consequences.
Read how Vibe Engineering explains circuit breaker pattern →
Also covered in
- Build High Value Software SystemsIn early access (MEAP)
- Elasticsearch in Action, Second Edition
- AI Agents in Action, Second Edition
- Financial AI in Practice
- .NET in Action, Second Edition
- Apache Kafka in Action
- Quarkus in Action
What to know first
- microservice architectureMicroservice architecture is a software architectural style that structures an application as independently deployable services, typically organized around focused capabilities and communicating through defined interfaces.
- distributed systemA distributed system is a computing system whose components run across multiple networked processes or machines and coordinate through communication.
- monolithic architectureMonolithic architecture is a software architectural style in which an application's major functionality is organized and deployed as a single unit.
- contractA contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
Related concepts
- client resiliency patternkind of · A client-side design pattern that helps a service consumer manage failures or performance problems when calling a remote service.
- half-open stateuses · A half-open state is a circuit-breaker state that permits a limited number of requests to test whether a previously failing dependency has recovered.
- jidokaimplements · A Lean production approach that builds quality into processes by stopping when abnormalities occur and preventing defects from proceeding.
- open stateuses · An open state is a circuit-breaker state in which calls to a failing dependency are rejected or fail immediately without being attempted.
- cascading failureaddresses · A cascading failure is a chain reaction in which the failure or degradation of one component propagates through dependencies and causes further failures or instability.
Questions about circuit breaker pattern
What is circuit breaker pattern?
A fault-isolation pattern that temporarily interrupts operations when monitored failures or unsafe conditions meet a defined criterion, limiting cascading effects and allowing recovery checks.
Which Manning books explain circuit breaker pattern?
Spring Microservices in Action, The Art of Code, Microservices Patterns, Second Edition, Grokking Software Architecture, gRPC Microservices in Go, Google Anthos in Action, Python Concurrency with asyncio, Architecting for Autonomy and 6 more.
What should I know before learning circuit breaker pattern?
Manning books that teach circuit breaker pattern usually introduce microservice architecture, distributed system, monolithic architecture and contract first.
What is circuit breaker pattern a kind of?
Circuit breaker pattern is a kind of client resiliency pattern. A client-side design pattern that helps a service consumer manage failures or performance problems when calling a remote service.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.













