Open 0xdevalias opened 1 year ago
Hello! Did you get any more insights about this topic? I'm on the same page than you :)
Seems like this library does the same and is better maintained: https://www.npmjs.com/package/p-limit
Seems like this library does the same
Reading the description of it, it definitely doesn't do the same things that bottleneck does.
It limits the number of concurrent requests
It limits the number of concurrent requests
In a VERY simply and naive way. It's basically equivalent to Bottleneck's maxConcurrent
parameter, but seemingly no more than that. Bottleneck supports a LOT more features/functionality than just maxConcurrent
:
Ok, you might wanna check out https://github.com/sindresorhus/p-queue Don't know if it does everything you need though, personally I was only after maxConcurrent
you might wanna check out https://github.com/sindresorhus/p-queue
p-queue
looks like by default it's also only really relevant for the maxConcurrent
and maybe minTime
modes.
The main benefits of bottleneck
are the reservoir
/related features, and how they work with 'token buckets' and similar.
It's possible that something like that might be able to be hacked together on top of p-queue
's custom QueueClass
; but failing that, I would say that it's also not really a contender for 'equivalent features' to bottleneck
:
@0xdevalias The closest alternative I found is redis-smq which is a Redis backed queue that also implements a rate limiter.
Batcher feature is also very useful. Does any of the libs shared above support similar thing?
Another alternative node-redlock
For those looking for maxConcurrent
and minTime
functional => check out https://github.com/sindresorhus/p-throttle
I see that the last version (
2.19.5
) was released back in 2019, and the last commit in this repo (b83528333ba4d27cf70b81cc2be12e09d7ff692f) seems to be from 2020, which presumably means it hasn't even been released.Looking at the npm package, it seems there have been
1,847,251
downloads in the last week, which implies there is still a lot of code out there using the package:Is it just that the code in this repo is stable/feature complete/doesn't need any updates, or?
And if this isn't maintained, what alternatives are people using these days? I've done some research a couple of times and this still seems to come back as the best option.
cc // @SGrondin
Edit:
A few potential alternatives that I found/others have suggested: