MuleSoft Certified Platform Architect – Level 1 — Question 38
A new upstream API is being designed to offer an SLA of 500 ms median and 800 ms maximum (99th percentile) response time. The corresponding API implementation needs to sequentially invoke 3 downstream APIs of very similar complexity.
The first of these downstream APIs offers the following SLA for its response time: median: 100 ms, 80th percentile: 500 ms, 95th percentile: 1000 ms.
If possible, how can a timeout be set in the upstream API for the invocation of the first downstream API to meet the new upstream API's desired SLA?
Answer options
- A. Set a timeout of 50 ms; this times out more invocations of that API but gives additional room for retries.
- B. Set a timeout of 100 ms; that leaves 400 ms for the other two downstream APIs to complete.
- C. No timeout is possible to meet the upstream API's desired SLA; a different SLA must be negotiated with the first downstream API or invoke an alternative API.
- D. Do not set a timeout; the invocation of this API is mandatory and so we must wait until it responds.
Correct answer: B
Explanation
Option B is correct because setting a timeout of 100 ms allows enough time for the first downstream API while still leaving 400 ms for the subsequent two APIs to complete within the overall SLA of 500 ms. Option A would not provide enough time for the other APIs, and option C suggests that negotiation is necessary, which is not the case here. Option D ignores the need for a timeout and could jeopardize meeting the SLA.