Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Implement a stateful circuit breaker that opens after consecutive failures and closes after consecutive blocked requests.
Build a gateway router that directs traffic to a primary server, automatically failing over to a secondary when the primary circuit is open.
Track failure and reset thresholds using simple counters without relying on external timers.
What This Tests
Finite state machine design
Threshold-based conditional state transitions
Object-oriented design and encapsulation
Traffic routing and failover logic
Common Patterns
State Machine
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Stdout
-