Unordered Parallel Execution

Learn how to parallelize execution by implementing a URL status monitoring application.

We just saw that streams process each data chunk in sequence, but sometimes, this can be a bottleneck because it won’t let us make the most of the concurrency of Node.js. If we have to execute a slow asynchronous operation for every data chunk, it can be advantageous to parallelize the execution and speed up the overall process. Of course, this pattern can only be applied if there’s no relationship between each chunk of data, which might happen frequently for object streams, but very rarely for binary streams.

Get hands-on with 1200+ tech skills courses.