cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Retry with exponential backoff

jason1
Deputy Chef I
Deputy Chef I

Hi, is there a simple way to build in exponential backoff when hit with a rate limit API error? The error handling step allows for retries, but there doesn't seem to be a way to set custom wait intervals in between tries.


Perhaps something that can be implemented with the new Wait step, but curious how others have tackled this.


Thanks!

10 REPLIES 10

The way we've implemented it was wrapping the whole in a for loop with a set number of attempts, and if the call passes, skip all the steps in the loop, but if it doesn't and it's the rate limit, start the wait.

george4
Deputy Chef I
Deputy Chef I

It's very simple Jason Jho here is the random wait time in the specific interval - https://share.getcloudapp.com/GGu6XznD

george4
Deputy Chef I
Deputy Chef I

Also, sometimes I use thing like that to pass the wait limit in seconds - https://share.getcloudapp.com/P8ukd7l2

jdasilva
Deputy Chef I
Deputy Chef I

Here is a related enhancement suggestion that I posted: https://support.workato.com/support/discussions/topics/1000100031


The suggestion to leverage a FOR EACH is a great one. We chose to build in retries to the error handling routine that gets called within the On Error to send notifications. We have configuration in a Lookup table for notification channel as well as these retries. If exponential retries are configured then we write the job to a Lookup table then leverage a recipe that runs every 5 minutes to re-run the job with Recipe Ops. This has worked well for systems with regular maintainence windows of 1-2 hours.

harish
Workato employee
Workato employee

Have you tried using try catch blocks? The have retry logic built in to them..