Break the dependencies: If possible, break the circular dependencies in the APIs. For example, API A depends on API B and API B depends on API A. Refactor the APIs to reduce the dependencies, so that API A depends on API B and API B does not depend on API A.
Use timeouts: Set timeouts for API calls. If an API call takes longer than the timeout, it can be assumed that the API is down, and the healthcheck can flag it as an error.
Use caching: Implement a caching mechanism to reduce the number of requests made to the APIs. Use a cache that stores responses from previous API calls.
Use async checks: Use an asynchronous healthcheck system that can perform multiple checks at once. This will prevent dependencies from blocking healthchecks.
Separated checks: Use separated checks for every API. This will make the check faster and much more clear.
Monitor the system: Monitor the system closely and be ready to take action if needed. Observability provides vital feedback to identify when such dependencies occur and what causes them.
Use a circuit breaker: Implement a circuit breaker which can prevent an API from being called after a failure. This will reduce the number of requests being sent to an API that is down.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-08-13 11:00:00 +0000
Seen: 9 times
Last updated: Aug 13 '22
How can one obtain live data from interactive broker through API?
Why am I not getting a response when making a URL call in ASP.NET Web API?
Is it possible to have multiple docks in a single project using rswag rails?
How can I retrieve folders using the Vimeo API?
How can the integration between Ready API tool and Zephyr squad be accomplished?
Does Amazon SP API have a designated endpoint to obtain a seller's identification?
What is the process to restrict Google API key using HTTP referrers?