Features Blog Docs GitHub Get Started

What is flashQ? A Modern Job Queue for AI Workloads

If you've ever built an application that needs to process tasks in the backgroundβ€”sending emails, generating reports, processing images, or calling AI APIsβ€”you've probably encountered job queues. They're the backbone of scalable applications, allowing you to offload work from your main application thread and process it asynchronously.

flashQ is a high-performance job queue built specifically for modern AI workloads. It's designed to be fast, simple, and reliableβ€”without requiring you to manage Redis or any external infrastructure.

The Problem with Traditional Job Queues

Most job queues in the Node.js ecosystem rely on Redis. Tools like BullMQ, Bull, and Bee-Queue are excellent, but they come with a significant operational overhead:

For AI workloads specifically, these limitations become even more painful. AI applications often need to:

Enter flashQ

flashQ was built from the ground up to solve these problems. Here's what makes it different:

1. No Redis Required

flashQ is a standalone server written in Rust. You run a single binary, and you're done. No Redis to provision, no connection strings to manage, no memory to monitor.

# Start flashQ server
./flashq-server

# Or with Docker
docker run -p 6789:6789 flashq/flashq

For persistence, flashQ can optionally connect to PostgreSQL. But for many use cases, the in-memory mode is perfectly sufficient.

2. BullMQ-Compatible API

If you're already using BullMQ, switching to flashQ is trivial. The API is intentionally compatible:

// Before (BullMQ)
import { Queue, Worker } from 'bullmq';

// After (flashQ)
import { Queue, Worker } from 'flashq';

That's it. Your existing code works with minimal changes.

3. 10x Faster

Because flashQ eliminates the network hop to Redis and is written in Rust with careful attention to performance, it's significantly faster:

Metric flashQ BullMQ + Redis
Push throughput 1.9M jobs/sec ~50K jobs/sec
Processing throughput 280K jobs/sec ~30K jobs/sec
Latency (p99) <1ms ~5-10ms

4. Built for AI Workloads

flashQ has features specifically designed for AI applications:

How flashQ Works

At its core, flashQ is a TCP server that accepts commands and manages job queues. Here's the architecture:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Your App      β”‚     β”‚   Workers       β”‚
β”‚  (Producer)     β”‚     β”‚  (Consumers)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚
         β”‚    TCP/HTTP/gRPC      β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
              β”‚   flashQ    β”‚
              β”‚   Server    β”‚
              β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
              β”‚  PostgreSQL β”‚ (optional)
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The server maintains queues in memory using efficient data structures:

A Simple Example

Let's build a simple AI pipeline that generates embeddings and stores them:

import { Queue, Worker } from 'flashq';

// Create a queue
const queue = new Queue('embeddings');

// Add a job
await queue.add('generate', {
  text: 'The quick brown fox jumps over the lazy dog',
  model: 'text-embedding-3-small'
});

// Process jobs
const worker = new Worker('embeddings', async (job) => {
  const { text, model } = job.data;

  // Call OpenAI API
  const response = await openai.embeddings.create({
    input: text,
    model: model
  });

  // Return the embedding
  return response.data[0].embedding;
});

When Should You Use flashQ?

flashQ is ideal for:

You might prefer BullMQ + Redis if:

Getting Started

Ready to try flashQ? It takes about 5 minutes to get started:

# Install the SDK
npm install flashq

# Start the server (using Docker)
docker run -d -p 6789:6789 flashq/flashq

# Or download the binary
curl -L https://github.com/egeominotti/flashq/releases/latest/download/flashq-linux -o flashq
chmod +x flashq
./flashq

Then in your code:

import { Queue, Worker } from 'flashq';

const queue = new Queue('my-queue');
await queue.add('task', { hello: 'world' });

const worker = new Worker('my-queue', async (job) => {
  console.log(job.data); // { hello: 'world' }
});
πŸ’‘ Pro Tip

Check out the documentation for advanced features like job dependencies, rate limiting, and clustering.

Conclusion

flashQ represents a new approach to job queuesβ€”one that prioritizes simplicity and performance without sacrificing features. If you're building AI applications and tired of managing Redis, give flashQ a try.

We're open source and actively developing new features. Join us on GitHub and let us know what you think!

Ready to try flashQ?

Get started in 5 minutes with our quickstart guide.

Get Started β†’