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.