Is a spawned subprocess considered a new dyno on Heroku?

backgroundworker, flask, heroku, python, web

Solution

Subprocesses are handled by a single dyno.

I'm not a python developer but I use Unicorn on my Heroku sites (Rails) usually with 4 subprocesses all contained within a single dyno. The amount of subprocesses you spawn needs to be mindful of memory consumption - you get 512Mb per dyno to play with.

Problem

I just moved from Epio to Heroku and after reading about their new process model and I was wondering how Heroku handles subprocesses. The FAQ says you can create subprocesses, but doesn't describe any of the implications of doing so. Does each subprocess count as new a dyno that you have to pay for? If so, wouldn't using Gunicorn also get expensive since it pre-forks its subprocesses? Finally, since Heroku isolates its processes, how can you communicate with your subprocesses?

Original source