If you use the gcloud CLI tooling to deploy your app, such as
gcloud app deploy
,
you can set the following autoscaling parameters in the
app.yaml
configuration file:
min_instances
max_instances
target_throughput_utilization
target_cpu_utilization
You can also use the API explorer user interface to set an autoscaling parameter:
Open the API explorer page.
In the right panel under the label Try This API, locate the name text box and enter the application name string in the following format:
apps/<YOUR-PROJECT-ID>/services/default/versions/<YOUR-VERSION-ID>
Replace
YOUR-PROJECT-ID
with your application's project ID, and<YOUR-VERSION-ID>
with the version of the app you are sending the request to. Use the rest of the string as shown.In the updateMask text box, enter the full
.json
object path name of the parameter you are setting, usingupdateMask
names from the table below:updateMask name automatic_scaling.standard_scheduler_settings.max_instances
automatic_scaling.standard_scheduler_settings.min_instances
automatic_scaling.standard_scheduler_settings.target_cpu_utilization
automatic_scaling.standard_scheduler_settings.target_throughput_utilization
If you are setting more than one parameter in one request, supply the mask name for each parameter, separated by a comma. For example, if you are setting the min and max instances, and the CPU utilization, use the following updateMask:
automatic_scaling.standard_scheduler_settings.max_instances, automatic_scaling.standard_scheduler_settings.min_instances, automatic_scaling.standard_scheduler_settings.target_cpu_utilization
In the Request body box, click Add request body parameters .
Select automaticScaling.
Click the hint bubble (the
+
icon), then select standardSchedulerSettings.Click the hint bubble, then select the desired auto scaling scheduler parameter and supply the desired value.
To supply another auto scaling scheduler parameter, click the hint bubble again, select the parameter, and supply its value.
The following example shows a sample filled out request body:
{ "automaticScaling": { "standardSchedulerSettings": { "maxInstances": 100, "minInstances": 1, "targetCpuUtilization": 0.75 } } }
Click Execute. You may be prompted to authorize API Explorer the first time you run this. If you are prompted, authorize API Explorer by following the prompts.
Confirm that the correct settings have been applied by opening the App Engine versions page for your project, and clicking View in the Config column. You should see the values you just set.