Which strategy is commonly used to achieve graceful degradation in microservices when a dependent service is unavailable?
easy📝 Conceptual Q2 of 15
Microservices - Resilience Patterns
Which strategy is commonly used to achieve graceful degradation in microservices when a dependent service is unavailable?
ARetrying the request indefinitely until success
BReturning cached or default data instead of failing
CShutting down the entire microservice immediately
DIgnoring the failure and returning an error to the user
Step-by-Step Solution
Solution:
Step 1: Identify graceful degradation techniques
Commonly, systems return cached or default data to maintain service availability during failures.
Step 2: Evaluate options
Returning cached or default data instead of failing aligns with graceful degradation. Retrying the request indefinitely until success risks resource exhaustion. Shutting down the entire microservice immediately causes total failure. Ignoring the failure and returning an error to the user degrades user experience.
Final Answer:
Returning cached or default data instead of failing -> Option B
Quick Check:
Fallback data keeps service responsive during outages [OK]
Quick Trick:Use fallback data to keep services responsive during failures [OK]
Common Mistakes:
MISTAKES
Assuming infinite retries are safe
Thinking shutting down is graceful
Believing returning errors is graceful degradation
Master "Resilience Patterns" in Microservices
9 interactive learning modes - each teaches the same concept differently