[Answer]-How to economically make limited use of worker processes in Heroku

1πŸ‘

βœ…

If you do not need your workers to engage immediately, you can use the scheduler add-on to regularly clear your task queue.

If you need a faster response time, then look at the Python wrapper for the Heroku API. With this you can use a variety of methods to detect when you need to run a worker, and dynamically spin one up, and spin it back down when it is unneeded. This is a non-trivial engineering task.

0πŸ‘

Interestingly enough, an answer to this question in blog-post form came through my RSS feed the same day I posted.

http://heyman.info/2012/dec/6/heroku-multiple-processes-single-dyno-with-foreman/

In sum: setup your Procfile to run Foreman, which can split your dyno time between your multiple processes. Haven’t tried it yet, but seems like a legit approach for low-traffic or testing sites.

πŸ‘€B Robster

Leave a comment