# Circuit Breaker

> Prevent cascading failures by stopping calls to failing services

- **Category**: Cloud
- **Subcategory**: gcp
- **Canonical URL**: https://designpattern.fyi/patterns/gcp_circuit_breaker/

---

## Description
The Circuit Breaker pattern prevents cascading failures by stopping calls to failing services after a threshold of failures is reached. The circuit transitions between closed, open, and half-open states. In GKE environments, this can be implemented using service mesh features or custom libraries.


## Use Cases
Use when connecting to services that may experience failures or when you need to prevent cascading failures in distributed systems.





## Trade-offs


### Advantages

- Prevents cascading failures

- Improves system resilience

- Automatic recovery detection

- Reduces load on failing services




### Considerations & Drawbacks

- Adds complexity to service calls

- Requires threshold tuning

- May mask underlying issues







---
**Reference**: [Original Source](https://cloud.google.com/architecture/hybrid-multicloud-patterns-and-practices)

