Reputation: 4775
In my app.yaml for Google App Engine I am using instance class as F4.
instance_class: f4
And when GAE autoscales, is it possible for GAE to spin up instance F2 instead of F4.
Can we make some setting in app.yaml to do so ?
Upvotes: 0
Views: 858
Reputation: 2673
You can make use of the App Engine Admin API to change that value, as the documentation of the API shows. There is a field, named instanceClass
you can use to change the type of the instance that is serving your application.
With that, you won't even need to redeploy your application as you can simply patch it on the fly.
Other than that, you won't be able to achieve that behavior using the app.yaml
without redeploying the whole app.
If your goal is to downscale the instance_class
during hours with less workload, you can make use of Cloud Scheduler to make a call to the App Engine Admin API and have this automated.
Upvotes: 2