How should you configure the instance group?

You are deploying an application to a Compute Engine VM in a managed instance group. The application must be running at all times, but only a single instance of the VM should run per GCP project.

How should you configure the instance group?
A . Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
B . Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
C . Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum
number of instances to 2.
D . Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.

Answer: A

Explanation:

https://cloud.google.com/compute/docs/autoscaler#specifications

Autoscaling works independently from autohealing. If you configure autohealing for your group and an instance fails the health check, the autohealer attempts to recreate the instance. Recreating an instance can cause the number of instances in the group to fall below the autoscaling threshold (minNumReplicas) that you specify.

Since we need the application running at all times, we need a minimum 1 instance.

Only a single instance of the VM should run, we need a maximum 1 instance.

We want the application running at all times. If the VM crashes due to any underlying hardware failure, we want another instance to be added to MIG so that application can continue to serve requests. We can achieve this by enabling autoscaling. The only option that satisfies these three is Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.

Ref: https://cloud.google.com/compute/docs/autoscaler

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments