Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.81 KB

BP_4032_en.md

File metadata and controls

44 lines (31 loc) · 1.81 KB

Set up a "Circuit breaker"

Identifiers

GreenIT V2 V3 V4

Categories

Life cycle Tiers Responsible
2. Design Datacenter Software Architect/Developer

Indications

Priority Implementation difficulty Ecological impact
2 2 2
Saved resources
Processor / Network / Queries

Description

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 0