1
votes

In the public document, there is a statement like this

"The scale command affects only process types named in the command. For example, if the app already has a dyno formation of two web dynos, and you run heroku ps:scale worker=2, you will now have a total of four dynos (two web, two worker)."

Actually, I have read a whole documentation about Dyno, so I assume I know basic principles.
However, I can't understand the meaning I quoted above. In the case I showed first, how many dynos we have? Now we have two dynos in the situation and then type the command, heroku ps:scale worker=2, so can we get two of worker dynos as well as the original two web dynos? Maybe I have an easy misunderstanding, but now really confused.

Thanks.

1

1 Answers

0
votes

You are correct.

In the example you posted, there is an application running on Heroku that has two types of dynos defined in the application's Procfile:

web: command_to_run_webserver
worker: command_to_run_worker

In the example above, they said that there are ALREADY 2 web servers running (but no workers).

This means that when you run the command:

heroku ps:scale worker=2

Heroku will create two new worker dynos, leaving you with a total of 4 dynos (2 web, and 2 worker).