Design Patterns · Senior · Question 42 of 75
How does the Circuit Breaker pattern help the client when an API fails?
- ✓Correct answer: After a series of errors it temporarily stops sending requests
- 2It encrypts requests if suspicious activity is detected
- 3It automatically switches the user to another UI language
Explanation
States: closed (requests go through), open (immediate failure or fallback), half-open (trial requests). This prevents an avalanche of retries to a failed service and gives the user a fast response with degraded functionality.