Circuit Breaker Pattern Implementation
Implement a Web API client with circuit breaker functionality that blocks requests to a service after 3 failures within 10 minutes, then reopens after a 5-minute recovery period. The system should prevent cascading failures by temporarily stopping calls to unhealthy services.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
You have a primary and replica database. Implement a circuit breaking wrapper on calls to both these databases. Circuit-breaking capability should apply to each of primary and replica independently. Call replica if call to primary fails or is rejected. Open circuit if 2 consecutive calls fail. Close circuit once you reject 2 calls.
Early August, 2026
Late July, 2026
Hello Interview Premium
Your account is free and you can post anonymously if you choose.