bull
bottleneck
Our great sponsors
bull | bottleneck | |
---|---|---|
50 | 9 | |
15,018 | 1,730 | |
0.9% | - | |
7.1 | 0.0 | |
2 days ago | 3 months ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bull
-
Prioritizing Concurrent Requests: Queuing system to handle distributed processes and messages with NodeJS and Bull
To implement the solution with a queue, I used a package called 'Bull' (https://github.com/OptimalBits/bull). It's a library that helps with distributed job control, providing some very useful solutions for this type of work, such as background job processing, queues with priorities (FIFO, LIFO, and others), among other features. 'Bull' uses Redis for queue storage, so if your application crashes for any reason, once it's back online, it will continue executing the processes that are in the queue. In our case, we'll use the FIFO (First in, first out) queue solution, meaning priority based on arrival order.
-
Instrumentation for Event Driven
We use bull-js for our distributed queue and event-driven library.
-
Redis master/slave setup on Kubernetes throwing error: BRPOPLPUSH { ReplyError: MOVED 2651
I'm using the excellent Redis based Bull.js as a job queue on Kubernetes.
-
How to use Job Queue to handle email sending in your Nestjs server
For Job Queue, NestJs provides a package named @nestjs/bull as an abstraction/wrapper on top of Bull, a popular, well-supported, high-performance Node. js-based Queue system implementation.
-
How do you handle queues in Node.js? Have you ever tried using pgboss?
I'm working on a large ETL project that involves handling queues for file integration. Currently, we are using Redis with Bull (https://www.npmjs.com/package/bull) for this purpose. However, to streamline our architecture and address security concerns, we are considering migrating the queue to PostgreSQL.
-
What is a good background scheduler?
BullMQ is a pretty solid choice: https://github.com/taskforcesh/bullmq It's the successor of Bull: https://github.com/OptimalBits/bull
-
Learning Guidance
For Node specifically, things like Streams, understanding the asynchronous model completely, and the event loop. Also, queues tend to get used a lot in Node, so understanding the basic concepts behind that and how to use something like bull would be useful.
-
image processing in express application, should it be done in a separate thread?
To do this properly, you need to put the task into queue, so if there are 1000 simultaneous uploads it won't kill your server but will be processed one by one. For the queue, see bull. Image hostings like AWS have some functionality for processing on their side, as an option.
- Best development practice for setting up a cron job for each user?
-
How do I implement Heroku background processes?
This is a memory intensive process though and Heroku is OOM'ing with R14 errors. For this they recommend migrating intensive work like this to a Background Job via Redis, implemented in Bull and Throng
bottleneck
- How can i improve my web scraper to be less abusive to the website.
-
Hey guys. Any good idea to make so users can only send 20 api requests per hours in express node js. Any good package or code ? Thanks in advance
bottleneck
-
Bottleneck not working for Deno? What's a good replacement?
I tried to use the Bottleneck library to rate limit a script that needs to make a lot of calls to a 3rd party API in Deno. However, to my surprise it just has no effect, even when tested on small toy examples. I didn't try it in Node or the browser. Is there a reason why this library just wouldn't work on the Deno runtime? Is there a good alternative? It's a hard thing to google for because results tend to be either cron or server-side libraries.
-
Newbie Help: Telegraf telegram bot with async/fetch, media send and async management
If you have trouble with floods of traffic, use a rate limiter. Check out https://www.npmjs.com/package/bottleneck
-
Struggling with very large cron jobs in node
Perhaps some streaming (native streams or some observables like rxjs) solution combined with rate limiting like https://www.npmjs.com/package/bottleneck ?
-
External API integrations from a microservice architecture
In general, you should avoid reinventing the wheel, so we looked for libraries which could solve our problem. We found BottleneckJS and decided to try to use it for our initial prototype.
-
what's your hidden gem package?
Between tiny-async-pool and bottleneck I can suck data from any api very efficiently and within rate limits
-
What is the best way of API Request throttling to match API Provider's limits?
Ah, this looks really nice! https://www.npmjs.com/package/bottleneck
-
Wait, Wait, Wait ... Now Go! ⌚⏳
As we can see here, in order to not violate the rate limiting rule, we must have 5 attempts at the API per minute or wait at lease 200 milliseconds between the executions. This was not that hard, but wait, JavaScript is asynchronous in nature. How will we make it run synchronously and sequentially ? The real question we are actually asking is, how do we make it that the HTTP requests to the remote API will wait the minimum delay time in between the executions. This is where we are going to use the tool that is called BottleNeck.
What are some alternatives?
Bee-Queue - A simple, fast, robust job/task queue for Node.js, backed by Redis.
axios-rate-limit - Rate limit for axios
kue - Kue is a priority job queue backed by redis, built for node.js.
breeze.js - Breeze for JavaScript clients
node-resque - Node.js Background jobs backed by redis.
Newman - Newman is a command-line collection runner for Postman
agenda - Lightweight job scheduling for Node.js
Swagger Client - Javascript library to connect to swagger-enabled APIs via browser or nodejs
better-queue - Better Queue for NodeJS
node-object-hash - Node.js object hash library with properties/arrays sorting to provide constant hashes. It also provides a method that returns sorted object strings that can be used for object comparison without hashes.
idoit - Redis-backed task queue engine with advanced task control and eventual consistency
whitestorm.js - :rocket: 🌪 Super-fast 3D framework for Web Applications 🥇 & Games 🎮. Based on Three.js