An order service calls a loyalty service to show reward points during checkout. When the loyalty service is down, checkout should still complete. What should the order service do?
Show answer and explanation
Answer: A
A fallback keeps the critical path working while a non-critical dependency is unavailable. Returning a default such as zero points, or cached data from a recent successful call, lets checkout finish in degraded form. Pairing this with a circuit breaker stops the order service from waiting on a failing dependency and spreading latency upstream. Because the loyalty data is secondary, the trade-off favors availability.
Why the other options are wrong
- B. Unbounded retries pile up requests against an already failing service and tie up the order service's threads. This can turn one outage into a wider one.
- C. Failing checkout over a non-essential feature makes the outage far worse for customers. The design goal is graceful degradation, not turning a secondary dependency into a hard requirement.
- D. Logging alone leaves the response incomplete, with no fallback value and no protection against repeated slow calls. It does not keep checkout working in a degraded form.