Skip to content

Add BetterQueue to the API section - #1192

Closed
Saiop68 wants to merge 1 commit into
sorrycc:masterfrom
Saiop68:add/better-queue
Closed

Saiop68 wants to merge 1 commit into
sorrycc:masterfrom
Saiop68:add/better-queue

Conversation

@Saiop68

@Saiop68 Saiop68 commented Oct 30, 2026

Copy link
Copy Markdown

Adds BetterQueue alongside Bottleneck in the API section.

BetterQueue is a distributed rate limiter and job queue for Node.js. Unlike Bottleneck, the queue state lives in Redis rather than in the process:

  • Cheap limiters. A limiter is a thin handle, so 1000 limiters cost roughly what 10 do.
  • Jobs survive a crash. Another process picks up work that a dead worker was holding.
  • Cross-process priority. Ordering is computed server-side, so it holds across the whole fleet.
  • Delayed jobs. scheduleAt() for work that needs to run later.

The repo includes a benchmark that runs both libraries in separate processes against the same Redis. With 1000 limiters and 51,000 jobs, RSS after the run was 415 MB for Bottleneck and 222 MB for BetterQueue, and throughput was 9,957/s vs 11,456/s.

MIT licensed, TypeScript, 37 tests with CI on Node 18/20/22.

@gokaygurcan

Copy link
Copy Markdown
Collaborator

wow, i thought we had a winner the other day. this one was even faster.

Repository owner locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants