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
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Stdout
-