finds.dev← search

// the find

mcollina/fastq

★ 1,135 · JavaScript · ISC · updated Dec 2025

Fast, in memory work queue

fastq is a minimal, in-memory work queue for Node.js with both callback and promise APIs. It's from Matteo Collina (Fastify core team), so the performance focus is credible. The target is anyone who needs controlled concurrency over async work without pulling in a heavy dependency.

The benchmark numbers are honest — it's within 5% of raw setImmediate, which means the abstraction cost is nearly zero. Both callback and promise APIs are first-class, not an afterthought, and TypeScript types are included in the package. The `concurrency` property is mutable at runtime, which is genuinely useful when you want to throttle under load. The promise variant swallows unhandled rejections on purpose, which avoids a common footgun when callers don't await every push.

The benchmarks are from Node 12, which is years out of date — the relative numbers may have shifted. There's no priority queue support; `unshift` gets you LIFO for one task but that's it. No backpressure mechanism: if you push 1 million tasks, they all land in memory immediately. The queue is purely in-process with no persistence, so a crash loses everything in flight — fine for its stated scope, but worth knowing before you use it for anything you can't afford to lose.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →