1.3x Faster Push
54,140 vs 43,261 ops/sec
Single job push operations
Real benchmark results comparing bunqueue TCP server against BullMQ with Redis on identical workloads.
1.3x Faster Push
54,140 vs 43,261 ops/sec
Single job push operations
3.2x Faster Bulk
139,200 vs 44,000 ops/sec
Bulk push (100 jobs per batch)
1.7x Faster Processing
33,052 vs 19,225 ops/sec
Job processing throughput
Zero Infrastructure
No Redis Required
Embedded SQLite vs Redis server
| Operation | bunqueue | BullMQ | Speedup |
|---|---|---|---|
| Push | 54,140 ops/sec | 43,261 ops/sec | 1.3x faster |
| Bulk Push | 139,200 ops/sec | 44,000 ops/sec | 3.2x faster |
| Process | 33,052 ops/sec | 19,225 ops/sec | 1.7x faster |
| Operation | bunqueue p99 | BullMQ p99 | Improvement |
|---|---|---|---|
| Bulk Push | 3.26ms | 4.53ms | 1.4x lower |
The benchmark performs three tests for both bunqueue and BullMQ:
Pushes 10,000 jobs using 32 parallel connections to measure raw push throughput.
// 32 concurrent clients pushing jobsawait benchmarkParallel('Push', async () => { await queue.add('job', PAYLOAD);}, 10000, 32);Pushes 100 jobs per batch, 1,000 times (100,000 total jobs) to measure bulk insertion performance.
// Batch of 100 jobs per operationconst jobs = Array.from({ length: 100 }, (_, i) => ({ name: 'bulk-job', data: { ...PAYLOAD, i },}));await queue.addBulk(jobs);Measures end-to-end throughput: pushing 10,000 jobs and processing them with 50 concurrent workers.
// Push jobs in parallel batchesfor (let i = 0; i < 10000; i += 1000) { await Promise.all(batch.map(() => queue.add('job', PAYLOAD)));}
// Wait for all to be processedwhile (processed < 10000) { await new Promise(r => setTimeout(r, 10));}TCP Pipelining
bunqueue’s TCP protocol supports pipelining - multiple commands in flight per connection, with reqId-based response matching.
Optimized Data Structures
Skip lists, MinHeap, and LRU cache provide O(log n) or O(1) operations for common tasks.
Batch Transactions
SQLite transactions batch multiple operations into single disk writes with WAL mode.
Auto-Scaled Sharding
Lock contention is minimized by distributing work across N independent shards (auto-detected from CPU cores, max 64).
| Feature | bunqueue | BullMQ |
|---|---|---|
| Queue Types | ✅ Standard, Priority, LIFO | ✅ Standard, Priority, LIFO |
| Delayed Jobs | ✅ Yes | ✅ Yes |
| Retries & Backoff | ✅ Exponential | ✅ Exponential |
| Dead Letter Queue | ✅ Built-in | ✅ Built-in |
| Rate Limiting | ✅ Per-queue | ✅ Per-queue |
| Cron Jobs | ✅ Built-in | ✅ Via scheduler |
| Job Dependencies | ✅ Parent-child flows | ✅ Parent-child flows |
| Persistence | ✅ SQLite (embedded) | ✅ Redis |
| Horizontal Scaling | ⚠️ Single process | ✅ Multi-process |
| External Dependencies | ✅ None | ❌ Redis required |
| S3 Backup | ✅ Built-in | ❌ Manual |
| TCP Pipelining | ✅ Built-in | ✅ Via Redis |
The benchmark source code is available at bench/comparison/run.ts.
# Clone the repositorygit clone https://github.com/egeominotti/bunqueue.gitcd bunqueuebun install
# Start Redis (required for BullMQ)redis-server --daemonize yes
# Start bunqueue serverbun run start &
# Run the benchmarkbun run bench/comparison/run.ts═══════════════════════════════════════════════════════════════ bunqueue vs BullMQ Comparison Benchmark═══════════════════════════════════════════════════════════════
Iterations: 10,000Bulk size: 100Concurrency: 50Payload: 111 bytes
✓ Redis connected✓ bunqueue server connected (port 6789)
📦 bunqueue (TCP mode) benchmarks...
Push: 54,140 ops/sec Bulk Push: 139,200 ops/sec (p99: 3.26ms) Process: 33,052 ops/sec
🐂 BullMQ (Redis) benchmarks...
Push: 43,261 ops/sec Bulk Push: 44,000 ops/sec (p99: 4.53ms) Process: 19,225 ops/sec
═══════════════════════════════════════════════════════════════ RESULTS═══════════════════════════════════════════════════════════════
┌─────────────┬──────────────────┬──────────────────┬──────────┐│ Operation │ bunqueue │ BullMQ │ Speedup │├─────────────┼──────────────────┼──────────────────┼──────────┤│ Push │ 54,140 ops/s │ 43,261 ops/s │ 1.3x ││ Bulk Push │ 139,200 ops/s │ 44,000 ops/s │ 3.2x ││ Process │ 33,052 ops/s │ 19,225 ops/s │ 1.7x │└─────────────┴──────────────────┴──────────────────┴──────────┘Hardware:
Software:
Configuration:
While bunqueue is faster for most use cases, BullMQ may be better when: