Overview
Graphile Worker is a job queue for Node.js backed entirely by PostgreSQL, created in 2019 by Benjie Gillam of Graphile, the team behind PostGraphile. Jobs are rows in Postgres, so they can be added inside the same transaction as your data changes, or directly from SQL functions and triggers, which avoids the dual-write problem of external queues.
Workers use LISTEN/NOTIFY to pick up new jobs within milliseconds, and the project cites throughput of up to 10,000 jobs a second. Failed jobs retry with exponential backoff. Recurring tasks can run with minute granularity and optionally backfill runs missed while servers were down; jobs can be scheduled for the future, debounced, cancelled or updated.
It is MIT-licensed and funded by sponsors. The trade-off of any Postgres queue applies: job traffic adds load to your database, so very high volumes may eventually warrant a dedicated queue, and the docs include examples of exporting jobs to other queues.
Pricing and plans
| Plan | Price | What you get |
|---|---|---|
| Graphile Worker | Free | MIT licence; crowd-funded through sponsorship |
| Priority support | Not published | Text support from the Graphile team via your chat server and code host |
What it does
- Postgres only
- Jobs live in PostgreSQL; the only runtime needed is Node.js.
- Low latency
- LISTEN/NOTIFY starts jobs within milliseconds of being queued.
- Retries
- Automatic retries with exponential backoff, using Postgres transactions so jobs are not lost.
- Recurring tasks
- Cron-like schedules at minute granularity with optional backfill.
- Scheduling and debouncing
- Run jobs at a future time, debounce with job keys, and cancel or update scheduled jobs.
- SQL-triggered jobs
- Add jobs from database triggers or functions.
Strengths and limitations
Strengths
- No Redis or broker needed
- Transactional job creation alongside your data
- Fast pickup via LISTEN/NOTIFY
- MIT licence from an established open-source team
Limitations
- Workers run on Node.js only
- Job load shares your Postgres database's capacity
- No hosted dashboard in the core library
- Relies on sponsorship for maintenance
Who it suits
Good for
- Node.js apps on Postgres, including PostGraphile or PostgREST backends
- Side projects that want jobs without more infrastructure
- Jobs triggered by database changes
Look elsewhere if
- Very high-throughput queues that would overload the primary database
- Non-Node.js worker code
Alternatives to Graphile Worker
| Tool | From | Free option | Stages |
|---|---|---|---|
| Hangfire Background job library for .NET | $500/yr | ||
| Hatchet Postgres-backed task queue and durable workflow engine | Usage-based | Free tier | |
| Cloudflare Queues Managed message queue for Cloudflare Workers | Usage-based | Free tier | |
| Cloudflare Workflows Durable workflow engine on Cloudflare Workers | Usage-based | Free tier | |
| Solid Queue Database-backed Active Job backend for Rails | — | ||
| Vercel Workflows Managed durable workflows on Vercel | Usage-based | Free tier |
Questions
Is Graphile Worker free?
Yes, it is MIT-licensed; Graphile asks users to sponsor development and offers paid priority support.
Does Graphile Worker need Redis?
No. It needs only PostgreSQL and Node.js.
Can Graphile Worker run cron jobs?
Yes. It supports recurring tasks with minute granularity and optional backfill.
How fast does Graphile Worker start jobs?
Jobs typically start within milliseconds because it uses Postgres LISTEN/NOTIFY.
Sources read for this page