Automatic scaling on App Engine: do I need to set scaling parameters for every version ?

617 views
Skip to first unread message

Patrice B

unread,
May 26, 2019, 2:32:25 PM5/26/19
to Google App Engine
It seems auto scaling parameters such as min_instances or min_idle_instances are not defined through the app.yaml file.   They can be defined through APIs.   But does this mean that for every deployment of a new version with gcloud app deploy I would need to go the the APIs again and define scaling parameters again ?

Harmit Rishi (Cloud Platform Support)

unread,
May 27, 2019, 10:03:45 PM5/27/19
to google-a...@googlegroups.com
Hi, 

Both environments of App Engine support automatic scaling. The steps on setting up the scaling will depend on the environment you are using and the language. The documentation here defines the scaling characteristics of both environments.  

In regards to your specific inquiry of automatic scaling, our App Engine: flexible scaling parameters are defined in the app.yaml. You may refer to the following documentation here for the available settings you can use with Python for flexible. (i.e: min_num_instances, max_num_instances, cpu_utilization, etc)

As for App Engine: standard, when you upload a version of a service, the app.yaml file specifies the scaling type and instance class that apply to every instance of that version. The scaling type controls how instances are created while the instance class determines the computing resources. You may find further details of how instance scaling works for standard with Python here. You can specify how your application should scale by defining the scaling elements found here. (i.e: max_instances, min_instances, max_idle_instances, min_idle_instances,etc  )

Also, I believe understanding how your applications are structured on App Engine will provide some insight into the scaling you wish to achieve. The following diagrams for flex here and standard here  illustrate the hierarchy of an App Engine app running with multiple services. 

I hope this clarifies the automatic scaling behavior for both App Engine environments.
Reply all
Reply to author
Forward
0 new messages