Configuring Managed Instance Group for Continuous Application Availability | Google Cloud

Best Practices for Configuring Managed Instance Group for Continuous Application Availability

Question

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?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

The correct answer to this question is (B) Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.

Here's the reasoning behind this answer:

A managed instance group is a group of Compute Engine virtual machine (VM) instances that are created from a common instance template. Managed instance groups are designed to help you scale your applications and ensure that your instances are running efficiently.

In this scenario, the application needs to be running at all times, but only a single instance of the VM should run per GCP project. This means that the application does not require scaling and should always be running on a single instance.

Option A: Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1. This option sets autoscaling to On, which means that the number of instances can increase or decrease based on the demand. However, the minimum and maximum number of instances are both set to 1, which means that the number of instances can never change. This option is incorrect because it contradicts itself.

Option B: Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1. This option sets autoscaling to Off, which means that the number of instances cannot change. The minimum and maximum number of instances are both set to 1, which ensures that only a single instance of the VM is running at all times. This option is correct because it meets the requirements specified in the question.

Option C: Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2. This option sets autoscaling to On, which means that the number of instances can increase or decrease based on the demand. The minimum number of instances is set to 1, which ensures that the application is always running. However, the maximum number of instances is set to 2, which means that there can be multiple instances running. This option is incorrect because it does not meet the requirement of only having a single instance running.

Option D: Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2. This option sets autoscaling to Off, which means that the number of instances cannot change. The minimum number of instances is set to 1, which ensures that the application is always running. However, the maximum number of instances is set to 2, which means that there can be multiple instances running. This option is incorrect because it does not meet the requirement of only having a single instance running.

Therefore, the correct answer is (B) Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.