I have a heroku app, that has two processes - a web and a worker, both in the same app. I plan to run both these in ps:scale 1x for the whole month. This essentially means that I exceed the 750 free dyno hours per month and have to pay some fees.
One app, two processes
App
- web: gunicorn myproject.wsgi --log-file -
- worker: celery -A myproject worker -B -E -l info -c 1
I was thinking of splitting them into two separate apps, the web and the worker having their own apps, and communicating via REST API between themselves. Since these are two apps, each of them would respectively be as below. This way both apps would be under 750 hours respectively and won't have a charge.
Two app, each with one processes
App1
- web: gunicorn myproject.wsgi --log-file -
App2
- worker: celery -A myproject worker -B -E -l info -c 1
What are the pros and cons of doing this over the first approach? Thanks