Clarify if HTTP Request runs in parallel or sequencially?

Does HTTP request node, without batch execution configured, make the requests sequentially or in parallel?
Node.js has threads for IO operations so it’s technically possible to make requests in parallel, but it’s not mentioned in the Request node docs and it’s not trivial to test.

Asking to prepare an error report to a service provider.

Cheers

Hi @mattesilver, inside a single execution multiple items will be processed sequentially. You can test this as described here: Is the order of data between nodes guaranteed? - #2 by MutedJam

Hope this helps!

1 Like

Just to clarify, I was wondering the same and I can say that

  • The order of results wont be messed up
  • But the requests are parallelized

To be sure I did the following test:

  • scenario A : webhook + sleep 2 seconds + responds
  • scenario B : making a array of 10 records and calling Scenario A webhook

Execution time of scenario B is 2 seconds and scenario A receives all requests at once:

Is actually the behaviour I was hoping for

They are not parallelized, they have been sent one by one. You can’t see it because the payload is too small to see the difference (it will be ~ 12 ms between the first and last request).

Example of how to see it. Master workflow

Webhook

By parallelized I meant that it does not wait for response before trigerring next query.

You can add a loop to send data to webhook and the webhook workflow would run in parallel, the result is captured back in the initial workflow sequentially - really useful for multiple LLM calls. Not sure how to run the loop in segments (for rate limit and server resources) as the batch option in the loop does not wait for the results to sent the next batch. — it seems putting batch number on the loop and adding time delay is easiest way to do limit control. Tried adding wait until all items returned but couldn’t get consistent results.

HTTP node sends all requests in parallel unless you put it behind the Loop node. Honestly I have no idea why this is the default behaviour and it’s not really documented anywhere, but I reproduced this many times - when I get 100 items from previous node (e.g. Google Sheets getRows op) and pass these into HTTP node, I get 100 PARALLEL requests via HTTP node.