Skip to content

Commit

Permalink
GITBOOK-182: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
manast authored and gitbook-bot committed Nov 16, 2023
1 parent 4cfe33e commit 8055598
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/gitbook/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
* [Returning job data](guide/returning-job-data.md)
* [Events](guide/events.md)
* [QueueScheduler](guide/queuescheduler.md)
* [Redis™ Compatibility](guide/redis-tm-compatibility/README.md)
* [Dragonfly](guide/redis-tm-compatibility/dragonfly.md)
* [Architecture](guide/architecture.md)
* [NestJs](guide/nestjs/README.md)
* [Producers](guide/nestjs/producers.md)
Expand Down
4 changes: 4 additions & 0 deletions docs/gitbook/guide/redis-tm-compatibility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Redis™ Compatibility

There are several alternatives for Redis and even though BullMQ is full Redis™ compliant, not all the alternatives are going to work properly. In this section we present the vendors that officially support BullMQ and that we regularly test to verify they keep staying compatible.

13 changes: 13 additions & 0 deletions docs/gitbook/guide/redis-tm-compatibility/dragonfly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Dragonfly

[Dragonfly](https://www.dragonflydb.io/) offers a drop-in replacement for Redis™, boasting a much faster and more memory-efficient implementation of several data structures used by BullMQ. It also enables the utilization of all available cores in your CPUs. Check [this article](https://bullmq.io/news/101023/dragonfly-compatibility/) for some performance results.

To fully leverage Dragonfly's capabilities, specific steps are necessary. Primarily, you should name your queues using curly braces. This naming convention allows Dragonfly to assign a thread to each queue. For instance, if your queue is named `myqueue,`rename it to `{myqueue}`.

If you manage multiple queues, this approach enables you to allocate different CPU cores to each queue, significantly enhancing performance. Even with a single queue, you can still exploit multi-core advantages in some cases. Consider splitting your queue into multiple ones, like`{myqueue-1}`, `{myqueue-2}`, etc., and distribute jobs randomly or using a round-robin method.

{% hint style="info" %}
Be aware that certain features like priorities and rate-limiting might not function across multiple queues. Your specific requirements will determine whether you can divide a single queue in this manner.
{% endhint %}

For comprehensive instructions and the necessary flags to optimize your Dragonfly instance for BullMQ, please consult the [official integration guide](https://www.dragonflydb.io/docs/integrations/bullmq).

0 comments on commit 8055598

Please sign in to comment.