menu
arrow_back

Autoscaling an Instance Group with Custom Cloud Monitoring Metrics

—/100

Checkpoints

arrow_forward

Create a GCS bucket

Create an instance template

Create an instance group

Configure autoscaling for the instance group

Autoscaling an Instance Group with Custom Cloud Monitoring Metrics

1시간 크레딧 7개

GSP087

Google Cloud Self-Paced Labs

Overview

This lab will you will create a Compute Engine managed instance group that autoscales based on the value of a custom Cloud Monitoring metric.

Objectives

  • Deploy an autoscaling 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 autoscales 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 create each instance in the instance group.
  2. Cloud Storage - A bucket used to host the startup script and other script files.
  3. Compute Engine startup script - A startup script that installs the necessary code components on each instance. The startup script is installed and started automatically when an instance starts. When the startup script runs, it in turn installs and starts code on the instance that writes values to the Cloud monitoring custom metric.
  4. Compute Engine instance group - An instance group that autoscales based on the Cloud monitoring metric values.
  5. Compute Engine instances - A variable number of Compute Engine instances.
  6. Custom Cloud Monitoring metric - A custom monitoring metric used as the input value for Compute Engine instance group autoscaling.

49026757e5fe0712.png

이 실습의 나머지 부분과 기타 사항에 대해 알아보려면 Qwiklabs에 가입하세요.

  • Google Cloud Console에 대한 임시 액세스 권한을 얻습니다.
  • 초급부터 고급 수준까지 200여 개의 실습이 준비되어 있습니다.
  • 자신의 학습 속도에 맞춰 학습할 수 있도록 적은 분량으로 나누어져 있습니다.
이 실습을 시작하려면 가입하세요