Zero Dependencies
No Redis, no external services. Just your app and a file on disk.
The Node.js ecosystem has relied on Redis-backed job queues for years. BullMQ, Bee-Queue, and others all share the same dependency: a running Redis server. We asked a simple question: what if we didn’t need Redis at all?
Redis is excellent software, but it introduces real operational complexity for job queues:
For many applications, especially single-server deployments and small teams, this overhead isn’t justified.
SQLite runs in-process. There’s no network hop, no connection pool, no separate service to manage.
Zero Dependencies
No Redis, no external services. Just your app and a file on disk.
In-Process Speed
Direct memory access instead of TCP round-trips to Redis.
Persistence by Default
WAL mode gives you crash-safe writes with read concurrency.
Simple Backups
Copy one file, or use built-in S3 backup.
Bun’s native SQLite driver (bun:sqlite) is what makes this architecture viable. It’s not a Node.js addon compiled from C - it’s built directly into the runtime with zero-copy optimizations.
import { Database } from 'bun:sqlite';
const db = new Database('./queue.db', { strict: true, create: true,});
// WAL mode for concurrent reads + writesdb.exec('PRAGMA journal_mode = WAL');db.exec('PRAGMA synchronous = NORMAL');This gives us prepared statements, transactions, and WAL mode with performance that rivals in-memory datastores for our workload patterns.
Raw SQLite writes are fast, but bunqueue goes further with a write buffer that batches disk operations:
// Jobs are added to an in-memory priority queue immediately// The write buffer flushes to SQLite every 10msconst queue = new Queue('emails', { embedded: true });
// This returns instantly - job is in memoryawait queue.add('send', { to: 'user@example.com' });
// For critical jobs, bypass the buffer:await queue.add('payment', data, { durable: true });The durable: true option bypasses the write buffer and writes directly to SQLite, trading throughput for guaranteed persistence.
bunqueue is designed for single-instance deployments. It’s the right choice when:
If you need multi-node clustering or Redis pub/sub features, BullMQ remains a solid choice. But for the majority of applications that run on a single server, bunqueue eliminates an entire layer of infrastructure.
In upcoming posts, we’ll dive deep into bunqueue’s architecture - from the sharding system that distributes jobs across CPU cores to the auto-batching system that makes TCP mode nearly as fast as embedded mode. Stay tuned.