Bird
0
0

You design a microservice that calls a payment gateway. To avoid delays, you want to use the fallback pattern. Which fallback strategy is best to keep the system responsive and safe?

hard📝 Trade-off Q15 of 15
Microservices - Resilience Patterns
You design a microservice that calls a payment gateway. To avoid delays, you want to use the fallback pattern. Which fallback strategy is best to keep the system responsive and safe?
AReturn a generic error message without fallback
BReturn a cached success response immediately and update later asynchronously
CRetry the payment gateway call 10 times before fallback
DRestart the payment microservice on failure
Step-by-Step Solution
Solution:
  1. Step 1: Understand fallback goals for payment service

    Fallback should keep system responsive and avoid blocking user with delays.
  2. Step 2: Evaluate options for responsiveness and safety

    Returning cached success immediately and updating asynchronously balances responsiveness and eventual consistency.
  3. Step 3: Eliminate risky or slow options

    Retries cause delays, generic errors hurt UX, restarting service is costly and slow.
  4. Final Answer:

    Return a cached success response immediately and update later asynchronously -> Option B
  5. Quick Check:

    Cached immediate fallback with async update = best practice [OK]
Quick Trick: Use cached immediate fallback plus async update [OK]
Common Mistakes:
MISTAKES
  • Excessive retries causing delays
  • No fallback causing poor user experience
  • Restarting services on failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes