in my company we are using different 3rd party systems, for example:
- a CRM, where we sync information about the customer; the goal is having a 1 to 1 syncronization.
- a transactional email system, with whom we can send email to the customer.
At the moment we are having several timeouts, because these systems have a fixed threshold of requests per second.
How do we handle these timeouts? For example, we stored the emails we can't send in our DB and a scheduled function retrieved them and tried to send them again.
We tried also to use a RateLimiter, but this will not work properly if you try to scale up multiple instance of the application.
But there is a proper way to handle these errors? It seems a really common problem, maybe there is a pattern to consider. These system doesn't support streaming or bulk API.