You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A circuit breaker interrupts requests processing to an external API when it's not responding.
Requests from user devices can use services for which a degraded mode is acceptable. These are called non-critical.
Depending on a several error criterias (timeout, number of errors, ...), the service that is calling a non-critical
external service can disable this call and immediately return an alternative response.
This pattern avoids unnecessarily soliciting service and network.
Example
On e-commerce websites, some product sheet information can be provided by dedicated services.
When the main service that provide product page "learns" that the detailed information service encounters errors,
it stops calling it, avoiding unnecessarily failed calls, leaving to the external service to go back up and saving resources on both sides.
The service remains operational even though experience is degraded.
Alternative solution
The number of ...
is equal to or less than
circuit breakers not implemented on non-critical services