Hello
Assuming we have 2 target URLs, the API should fetch data from the first URL, and if the first URL Target endpoint is unavailable, then this should be identified in the response and the call should be made to 2nd URL / Proxy and the response from 2nd URL/Proxy should be attached .to the response.
Is this possible, if possible can I get an example, or can you let me know how I can achieve that.
Thanks
John
Solved! Go to Solution.
You could follow the suggestions given to use conditional service callout or by using the Load Balancer approach and take the server out of rotation.
Additionally, the fact that the server returns a 404 doesn't make sense as what happens if the request is genuinely asking for an object that doesn't exist? It will still go to the secondary server and get another 404. In my opinion it should return a 503 unless it's timing out. and if it timing out, i think the load balancer approach is best to take the server out of circulation to avoid extended response times.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |