At your service! With schedule-based autoscaling, VMs are at the ready
We believe that managing even the most demanding VM-based application in Google Cloud should be easy. For instance, in a Compute Engine environment, managed instance groups (MIGs) offer autoscaling that lets you automatically change an instance group's capacity based on current load, so you can rightsize your environment—and your costs. Autoscaling adds more virtual machines (VMs) to a MIG when there is more load, and deletes VMs when the need for VMs is lower.
But if your VMs take several minutes to initialize, you might not have sufficient capacity to respond effectively to sudden increased demand. And chances are, this happens on a regular basis, for example, every morning when your users wake up and start to use your service, or when there’s a special event like a marketing campaign or a time-bound customer offer. If only you could tell the autoscaler to spin up more VMs in anticipation of those busy periods… Well, now you can!
Introducing schedule-based autoscaling
Compute Engine’s new schedule-based autoscaling lets you improve the availability of your workloads by scheduling capacity ahead of anticipated load. If you run your workload on a managed instance group (MIG), you can schedule the required number of virtual machine (VM) instances for recurring load patterns as well as one-off events. Use scaling schedules if your workload takes a long time to initialize and you want to scale out in advance of anticipated load spikes.
You can create a schedule using the Google Cloud Console. Select an autoscaled MIG from the instance groups page and click Edit group. Under the Autoscaling policy section, click Add a new scaling schedule.
The Cloud Console allows you to check the status and manage all your existing scaling schedules.
$ gcloud beta compute instance-groups managed update-autoscaling autoscaled-group \
--schedule-cron="0 8 * * Mon-Fri" \
--schedule-description="At least 10 VMs every Monday-Friday 8AM-5PM"