Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is a spawned subprocess considered a new dyno on Heroku?

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?

like image 226
Joe Avatar asked Apr 22 '12 16:04

Joe


1 Answers

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.

like image 103
John Beynon Avatar answered Sep 24 '22 16:09

John Beynon