Alumio Task: Single threaded

Hi @abubakar,

Within a single route Alumio should never process the tasks multi-threaded. I suppose you are running into a problem with rate limiting.

You can do two things:

  1. First thing I would check is whether the API returns a header that gives information about ratelimiting. An example header would be:
X-RateLimit-Minutely-Remaining: 60

This header indicates that I can send another 60 requests during this minute. With each subsequent request, the number goes down. During the next minute, the value resets to it’s original value.

In order to support this within Alumio, you need to add a plugin to the HTTP client (or specifically to the HTTP transformer/publisher where you are doing the request). The plugin is called Rate limit based on header. You can fill in the header name, the threshold when Alumio needs to pause the requests and how long it should wait for. This is something that you have to think about and optimize as you go along.

  1. Second option in case your endpoint does not reveal any rate limiting header, is to implement a ‘Sleep transformer’. You could add this immediately after the API call so that Alumio will wait 10 seconds before proceeding.

Good luck! :slight_smile:

1 Like