Circuit Breaker

A software pattern that prevents cascading failures by temporarily stopping requests to a failing service.

A circuit breaker is a software design pattern inspired by electrical circuit breakers that prevents a failing service from bringing down the entire system. When a service starts failing (exceeding an error threshold), the circuit breaker "opens" and immediately rejects requests to that service rather than letting them queue up and timeout, which would cascade the failure.

The circuit breaker has three states: Closed (normal operation, requests flow through), Open (requests are immediately rejected, the failing service gets time to recover), and Half-Open (a limited number of test requests are allowed through to check if the service has recovered). If the test requests succeed, the circuit closes and normal operation resumes.

Circuit breakers are essential in microservice architectures where one slow or failing service can cause cascading timeouts across the entire system. They protect the caller from wasting resources on requests that are likely to fail and give the failing service breathing room to recover. External monitoring with Hyperping can detect when a service is experiencing issues that would trigger circuit breakers downstream.

Hyperping monitoring dashboard

Related Terms

Failover
The automatic switching to a backup system when the primary system fails, ensuring service continuit...
Availability
The proportion of time a system is functional and accessible, often expressed as a percentage.
Service Mesh
A dedicated infrastructure layer for handling service-to-service communication in microservice archi...
Latency
The time delay between a request being sent and the response being received, typically measured in m...

Related Resources

Get started

Start monitoring in the next 5 minutes.

Stop letting customers discover your outages first. Set up monitoring, status pages, on-call, and alerts before your next coffee break.

14 days free trial — No card required