Rate limit with sleep

I have read over many threads in here that say to rate limit your scenarios you can use the tool sleep, adding a sleep of one second will only allow 1 bundle per second to come out at a time.

In my current scenario it is not behaving like this.
I have the incoming webhooks limited to 10 per second, and a sleep module of 5 seconds.

What happens is all 10 bundles hit the sleep at the same time, they all wait 5 seconds, then they all come out the other end at the same rate they entered and finish at the same time.

Am I missing something?



Yes I was missing something, webhooks are processed in parallel so sleep module does indeed behave differently, using sequential processing rate limits to about 1 per 5 seconds so you dont need to use sleep.

The only issue I am not sure about is the scenario being paused if there is a incomplete execution, I am using breaks with retries on the sheets modules so it should fix itself?

β€œIn the case of the webhook scenarios, execute them sequentially in order to reduce the number of scenario executions running at the same time.”

3 Likes