Can someone explain “heroku ps:scale web=1”

后端 未结 4 1941
北恋
北恋 2020-12-30 01:21

I\'m looking for a straightforward explanation of what all happens when I enter the following command:

heroku ps:scale web=1 

What is Hero

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 02:05

    Whenever you freshly deploy your app in heroku it starts up one dyno where the app runs. Just consider it as a server. This server cant handle large number of requests all at once.

    So in order to handle all these bulk requests you may want to run multiple instances of your app i.e. multiple dyno using the spare resources available in heroku just like running multiple instances in tomcat for the same application using the command (within limits ofcourse):

    heroku ps:scale web=

    Heroku does the load-balancing for you. Thus you are able to horizontally scale your app to handle more load. Hope this clears this concept!

提交回复
热议问题