Confusion over Heroku Pricing on Hobby and Professional(Standard 1x)

Viewed 286

My goal is to run 2 workers and 1 web under 14 USD.

or Can I run multiple processes under same dyno and is it a good production practice(n.b: I have a high traffic site)?. (this seems like only way to keep it under 14 USD)

I have a Procfile defined like below:

web: gunicorn -b 0.0.0.0:5004 server:engine --preload --log-file=- --log-level DEBUG -w 4
worker: python3 -u _worker.py

This is running on a Heroku hobby server($7) and for two processes, two dynos it cost me 7+7 = 14 USD. enter image description here

Now if you look at the Professional(Standard 1x) Pricing it just cost me 25 USD for each dyno here. enter image description here

But clearly, in the Heroku pricing section, it is written that Unlimited background workers from Standard1x. Check the last Point of Standard Dyno Pricing What does this even mean? Does it just mean I can scale but I gotta pay for each one or Is it like I can start multiple workers in a single Dyno to keep it 25 USD?.

1 Answers

A separate Dyno is required for each additional worker process. The wording on the Heroku's pricing page is a little misleading.

enter image description here

I queried it with support and they clarified:

In this context, "unlimited background workers" means you can run as many worker processes as you need to. On the lower tiers(free and hobby), the number of worker processes that can be used is limited.

However, Heroku is built on a 1-process-per-dyno model, which means every worker needs to run on its own dyno. So you will be charged for 1 dyno for each worker process you use. To say it a different way, it's not "unlimited worker processes for $25/mon", but instead it's "run unlimited worker processes at $25/mon each".

Basically, the Free tier can have up to 2 dynos, Hobby can have up to 10 and the Production tiers can have as many as you want ... but you'll pay for each dyno :)

Related