caolan / async

Async utilities for node and the browser
http://caolan.github.io/async/
MIT License
28.15k stars 2.41k forks source link

Add adaptive functions #1887

Closed AlexRMU closed 9 months ago

AlexRMU commented 1 year ago

I think it would be nice to add adaptive parallelism to existing functions or create new ones.

image https://netflixtechblog.medium.com/performance-under-load-3e6fa9a60581

For example: There is a maximum, minimum, initial and current limit. There is a callback that accepts an error that occurred during the call (for example, an error related to parallelism or another error) and returns a boolean (whether to reduce the limit or not).

aearly commented 9 months ago

This seems like the kind of thing that is hard to get right, and hard to generalize for a low-level library such as Async. I'd encourage you to experiment with this in your own project.