Skip to main content

2 posts tagged with "nestjs"

View All Tags

Bull Usage Tutorial

· 15 min read
XOne
webmaster

Basic Concepts

What is Bull?

Task queues are generally used for asynchronously processing time-consuming tasks such as video transcoding and sending SMS messages, preventing API connection timeouts.

Bull is a Node library that implements a fast and powerful queue system based on redis.

Although it is possible to implement a queue using direct Redis commands, this library provides an API that handles all the underlying details and enriches the basic functionality of Redis, making it easy to handle more complex use cases.

If you are not familiar with queues, you might wonder why you need them. Queues can elegantly solve many different problems, such as creating robust communication channels between microservices to smoothly handle CPU peaks, or distributing heavy work from one server to many smaller work intervals.