0
0
Microservicessystem_design~20 mins

Fallback pattern in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Fallback Pattern Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the purpose of fallback pattern

In a microservices architecture, what is the primary purpose of implementing a fallback pattern?

ATo log all service calls for auditing purposes
BTo provide an alternative response or behavior when a service call fails or is slow
CTo permanently disable a service when it fails once
DTo increase the number of service calls to improve throughput
Attempts:
2 left
💡 Hint

Think about how to keep the system responsive when a service is unavailable.

Architecture
intermediate
2:00remaining
Choosing the correct fallback implementation

You have a microservice that calls an external payment service. Sometimes the payment service is slow or unavailable. Which fallback approach is best to maintain user experience?

AQueue the payment request for later processing and inform the user of delay
BReturn a cached successful payment confirmation from a previous transaction
CRetry the payment call indefinitely until it succeeds
DReturn a default failure message immediately and log the error
Attempts:
2 left
💡 Hint

Consider user experience and system reliability when the external service is down.

scaling
advanced
2:00remaining
Scaling fallback mechanisms under high load

When a microservice experiences high load and many fallback executions, what is a key consideration to ensure the fallback system itself does not become a bottleneck?

AIncrease the number of fallback responses to match the load
BRemove all fallback logic to reduce complexity
CImplement rate limiting and circuit breakers to control fallback invocation
DDisable monitoring to reduce overhead
Attempts:
2 left
💡 Hint

Think about controlling traffic and preventing overload.

tradeoff
advanced
2:00remaining
Tradeoffs of aggressive fallback usage

What is a potential downside of aggressively using fallback responses in a microservices system?

AIt may mask real issues and delay fixing the root cause of failures
BIt always improves system performance without drawbacks
CIt reduces the need for monitoring and alerting
DIt guarantees 100% uptime for all services
Attempts:
2 left
💡 Hint

Consider what happens if fallback hides problems.

component
expert
3:00remaining
Designing a fallback component for a microservice

You are designing a fallback component for a microservice that calls multiple downstream services. Which design choice best supports scalability and maintainability?

AImplement a centralized fallback service that handles all fallback logic for downstream calls
BDisable fallback and rely solely on retries
CEmbed fallback logic directly inside each microservice's business logic without separation
DUse a shared library with configurable fallback strategies that each microservice imports
Attempts:
2 left
💡 Hint

Think about code reuse and flexibility across services.