Background worker hosting
Host background workers for BullMQ, Celery and Sidekiq
A background worker on Makofy is an always-on service with no port that runs your queue consumer (BullMQ, Celery, RQ, Sidekiq or your own loop) and is started again if it crashes. It costs $3.50 a month on Starter (512 MB, 0.5 vCPU), and a private Redis 8 queue adds $2, so a web app plus a worker plus Redis starts at $7 a month.
Last updated · By the Makofy team (Muncar Ventures LLC)
When you need a background worker
Anything too slow to do inside a web request belongs in a worker: sending email, resizing images, generating PDFs, importing CSV files, calling slow third-party APIs or scraping. The web app puts a job on a queue and answers straight away; the worker takes jobs off the queue and does the work at its own pace. Workers also suit long-running processes that aren’t queues at all, such as a Discord bot or a consumer of a message stream.
On Makofy a worker is its own service, separate from the web app, built from the same repository or from a different one. It has no port, no URL and no HTTP health check: it counts as healthy while its process is running, and it only makes outbound connections to Redis, Postgres or other APIs.
What a worker costs
| Setup | What runs on Makofy | Monthly cost |
|---|---|---|
| Worker only | Starter worker | $3.50 |
| Web app that may sleep + worker + queue | Nap web + Starter worker + Redis | $7 |
| Always-on web app + worker + queue | Starter web + Starter worker + Redis | $9 |
| Production stack | Starter web + Starter worker + Redis + Postgres | $12 |
| Heavy jobs (images, PDFs) | Pro worker (2 GB / 2 vCPU) + Redis | $14 |
For comparison, a 512 MB always-on instance was $7 a month on Render and as a Heroku Basic dyno, about $3.69 on Fly.io and $5 plus usage on Railway (list prices checked November 2026). On Makofy, the $1.50 Nap type is limited to web services because a worker receives no incoming request that could wake it, so workers start at Starter.
Deploy a BullMQ worker (Node.js)
- In the dashboard, add the Redis add-on ($2/mo) and copy its connection URL.
- Add the worker code below to your project, with a
startscript such as"start": "node worker.js". Makofy runsnpm startfor Node.js projects on Node 20. - Install the CLI (
curl -fsSL https://makofy.com/install.sh | sh), runmakofy login, thenmakofy deploy --type workerfrom the worker’s folder. - Put
REDIS_URLin an env group linked to both the web app and the worker (or set it on each), then deploy both again. Variables are applied at deploy time. - Enqueue a test job from the web app and check
makofy logsfor the worker’s output.
// worker.js: process jobs from the "emails" queue
import { Worker } from 'bullmq';
import IORedis from 'ioredis';
// BullMQ workers need maxRetriesPerRequest: null
const connection = new IORedis(process.env.REDIS_URL, { maxRetriesPerRequest: null });
const worker = new Worker(
'emails',
async (job) => {
console.log('sending email', job.id, job.data.to);
// ...call your email provider here...
},
{ connection, concurrency: 5 },
);
worker.on('failed', (job, err) => console.error('job failed', job?.id, err.message));
// Let running jobs finish before a new version replaces this one.
process.on('SIGTERM', async () => {
await worker.close();
process.exit(0);
});// In the web app: enqueue a job and return immediately
import { Queue } from 'bullmq';
import IORedis from 'ioredis';
const emails = new Queue('emails', { connection: new IORedis(process.env.REDIS_URL) });
await emails.add(
'welcome',
{ to: 'user@example.com' },
{ attempts: 3, backoff: { type: 'exponential', delay: 5000 }, removeOnComplete: 1000 },
);Celery, RQ, Sidekiq and other queues
The pattern is the same in every stack; only the start command changes. Point the library at the REDIS_URL you set and give the worker its own command, for example makofy deploy --type worker --command "celery -A tasks worker --loglevel=INFO".
| Library | Worker start command |
|---|---|
| Celery (Python) | celery -A tasks worker --loglevel=INFO |
| RQ (Python) | rq worker --url $REDIS_URL |
| Dramatiq (Python) | dramatiq tasks |
| Sidekiq (Ruby) | bundle exec sidekiq |
| BullMQ (Node.js) | node worker.js |
Queues backed by Postgres (for example Oban-style or SKIP LOCKED job tables) work too: skip Redis and point the worker at your Postgres database instead.
Redis limits to plan for
The Redis add-on is Redis 8, password-protected and reachable only from apps in your workspace. It has about 112 MB of memory, uses the noeviction policy (the setting BullMQ requires, so queued jobs are never silently dropped) and persists data with an append-only file. When it is full, new writes fail instead of evicting keys, so keep job payloads small (an ID rather than a whole file), store large data in Postgres, and trim finished jobs with options like BullMQ’s removeOnComplete. More in Postgres and Redis.
Running workers well
- Handle SIGTERM. On each deploy the old worker is stopped. Close the worker on SIGTERM so in-flight jobs finish or go back to the queue.
- Let the queue retry. Give jobs
attemptsand a backoff so a flaky API call doesn’t lose work. - Bad deploys roll back. If a new worker version keeps crashing during the deploy, Makofy restores the previous working version; any earlier deploy can also be restored with one click.
- Size by memory. Start on Starter. For image or PDF work move the worker to Basic (1 GB, $6), Pro (2 GB, $12, protected first when the node is busy) or Dedicated (4 GB with 1 vCPU reserved, $35).
- Clock-based work is different. Jobs that should run at fixed times belong in a cron service, not a worker with a timer.
FAQ
Frequently asked questions
How much does it cost to host a background worker?
On Makofy a worker costs $3.50 a month on Starter, plus $2 a month if it needs the Redis add-on as its queue.
Does a background worker need a port?
No. Deploy it with makofy deploy --type worker; it gets no port or URL and only makes outbound connections.
Can I run Celery on Makofy?
Yes. Use the Redis add-on as the broker, set REDIS_URL, and deploy a worker whose start command is celery -A tasks worker.
Can a worker use the $1.50 Nap type?
No. Nap is for web services, which wake on an incoming request; workers need Starter or a larger type.
How do I give a worker more memory or CPU?
Change its instance type in the app’s settings, for example to Pro with 2 GB and 2 vCPU for $12 a month; the change is prorated.
Related
Deploy your app in a few minutes.
Connect a GitHub repo or run makofy deploy. Flat price per app, 7-day free trial, card required.