I have a Java back-end, which itself consumes many web-APIs through HTTP requests. In one transaction, I may query 3 or 4 APIs issuing 20-30 requests for each of them.
Sometimes, the APIs are either down or under pressure causing my code to timeout or slow down in the best case. The effect multiplies, since I have a upper limit on the parallelism in issuing the requests. This in turn badly affects the responsiveness of the front end of my application.
Is there a Java library or framework which may help me detect times when a certain API is repetitively timeout or slowing down? or maybe a framework to monitor the "health" of the APIs? This would allow me to stop issuing requests to the slow/timing out/offline API for some time or for a specific transaction, thus saving waiting time.