QwikSkills Support

Google Labs
Autoscaling using Instance Groups

Autoscaling using Instance Groups

Difficulty Level
Lab Duration
60 Min
About Lab


In this lab, you will create a Compute Engine-managed instance group that auto scales based on the value of a custom Cloud Monitoring metric.

What will you learn?

  • Deploy an auto-scaling Compute Engine instance group.
  • Create a custom metric used to scale the instance group.
  • Use the Cloud Console to visualize the custom metric and instance group size.

Application architecture

The autoscaling application uses a Node.js script installed on Compute Engine instances. The script reports a numeric value to a Cloud monitoring metric. You do not need to know Node.js or JavaScript for this lab. In response to the value of the metric, the application auto scales the Compute Engine instance group up or down as needed.

The Node.js script is used to seed a custom metric with values that the instance group can respond to. In a production environment, you would base autoscaling on a metric that is relevant to your use case.

The application includes the following components:

  1. Compute Engine instance template - A template used to cre