L
L
lookingfor22020-08-11 14:31:23
PHP
lookingfor2, 2020-08-11 14:31:23

It is reliably known that some API periodically falls off on a timeout or with a 5xx error, how to solve it?

It is reliably known that some API periodically falls off on a timeout or with a 5xx error. There are no analogues, there is nothing to replace this service. Using this API is critical for asynchronous tasks within an application. What do we do? What libraries and patterns will we use to minimize losses and increase the stability of the application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-sem, 2020-08-11
@lookingfor2

1) Cache on the application side, which is possible. It all depends on what kind of API it is and the nature of working with it. This is not stated in the question.
2) When accessing the API, take into account the timeout or 500 error. Repeat until you succeed or admit defeat. If there are a lot of backends on the API, you can try sending parallel requests in the style of promises.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question