Skip to main content
100%

Getting Kue working on Heroku

✓ Published0🌍 Public
RRandomEtc
Last edited Sep 29, 2011
Created on Sep 26, 2011

This example shows how to run a Kue job queue on Heroku with separate web and worker processes. The web server, built with Express, creates a job on an HTTP request, while the worker processes it using `jobs.process`. Both the web app and the consumer connect to a RedisToGo instance by overriding `kue.redis.createClient` to parse the `REDISTOGO_URL`, and the `Procfile` defines the process types that Heroku scales independently.

AI-generated description

Workers can be activated with heroku scale:

heroku scale web=1 worker=1

Each process is $0.05/hr (or about $35/month).

You'll need a Redis instance. For RedisToGo you need a mini or higher to accept two connections AFAICS. Not sure what the upper limit is on workers yet.

heroku addons:add redistogo:mini   

A mini instance is just $5 a month and should be billed by the second. To remove, do:

heroku addons:remove redistogo   

Similar vizzes