Bird
Raised Fist0
HLDsystem_design~20 mins

Circuit breaker pattern in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Circuit Breaker Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the Circuit Breaker States
Which of the following correctly describes the three main states of a circuit breaker in system design?
AClosed: Requests flow normally; Open: Requests are blocked; Half-Open: Some requests allowed to test recovery
BClosed: Requests are blocked; Open: Requests flow normally; Half-Open: All requests are retried
CClosed: System is down; Open: System is up; Half-Open: System is restarting
DClosed: Requests are queued; Open: Requests are dropped; Half-Open: Requests are duplicated
Attempts:
2 left
💡 Hint
Think about how a circuit breaker protects a system from failures by controlling request flow.
Architecture
intermediate
2:00remaining
Placing a Circuit Breaker in a Microservices Architecture
Where is the best place to implement a circuit breaker in a microservices architecture to protect a service from downstream failures?
AOn the database server
BInside the downstream service itself
COn the client side before calling the downstream service
DOn the network firewall
Attempts:
2 left
💡 Hint
Consider where you want to stop requests before they reach a failing service.
scaling
advanced
2:30remaining
Scaling Circuit Breaker for High Traffic Systems
In a high traffic distributed system, what is a key challenge when scaling circuit breakers across multiple instances, and how can it be addressed?
AChallenge: Too many retries; Solution: Disable retries globally
BChallenge: Increased latency; Solution: Remove circuit breakers entirely
CChallenge: Overloading the database; Solution: Cache all requests
DChallenge: Inconsistent state across instances; Solution: Use centralized state storage or distributed consensus
Attempts:
2 left
💡 Hint
Think about how multiple instances share information about failures.
tradeoff
advanced
2:00remaining
Tradeoffs of Circuit Breaker Timeout Settings
What is a tradeoff when setting a very short timeout duration for the circuit breaker before it transitions from Open to Half-Open?
AMay cause premature retries leading to repeated failures
BIncreases system downtime by blocking requests too long
CReduces system responsiveness by allowing too many requests
DCauses the circuit breaker to never open
Attempts:
2 left
💡 Hint
Consider what happens if the system tries to recover too quickly.
estimation
expert
3:00remaining
Estimating Capacity for Circuit Breaker State Storage
You have 1000 microservice instances each with 10 downstream services protected by circuit breakers. Each circuit breaker state requires 1KB of memory. Estimate the total memory needed to store all circuit breaker states if centralized storage is used.
AApproximately 1 MB
BApproximately 10 MB
CApproximately 100 MB
DApproximately 1 GB
Attempts:
2 left
💡 Hint
Multiply instances by services and memory per state.