MuleSoft Certified Platform Architect – Level 1 — Question 46
An API implementation is being designed that must invoke an Order API, which is known to repeatedly experience downtime.
For this reason, a fallback API is to be called when the Order API is unavailable.
What approach to designing the invocation of the fallback API provides the best resilience?
Answer options
- A. Search Anypoint Exchange for a suitable existing fallback API, and then implement invocations to this fallback API in addition to the Order API.
- B. Create a separate entry for the Order API in API Manager, and then invoke this API as a fallback API if the primary Order API is unavailable.
- C. Redirect client requests through an HTTP 307 Temporary Redirect status code to the fallback API whenever the Order API is unavailable.
- D. Set an option in the HTTP Requester component that invokes the Order API to instead invoke a fallback API whenever an HTTP 4xx or 5xx response status code is returned from the Order API.
Correct answer: D
Explanation
Option D is correct because it directly handles failures from the Order API by switching to the fallback API based on the specific error responses, enhancing resilience. Options A and B do not provide an automatic response to downtime, while Option C involves redirection, which may not be as effective in handling the specific error codes during API invocation.