Single Instance Managed Instance Group Configuration on GCP
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?
Community Insight
The core test is whether autoscaling must be enabled to guarantee continuous availability of a single-instance MIG; the trap is assuming autoscaling off still auto-replaces deleted or crashed instances.
This question tests how to configure a Compute Engine managed instance group so a single-instance application remains available at all times. The correct approach uses autoscaling enabled with both minimum and maximum set to one, ensuring the group always maintains exactly one instance.
The most common wrong answer is B (autoscaling Off, min=1, max=1). Learners assume the MIG's fixed target size alone ensures a replacement is always created, but community testing in the GCP console showed that with autoscaling off, a deleted instance was NOT recreated.
Community Discussion (129 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
With autoscaling set to On and both minimum and maximum set to 1, the autoscaler continuously enforces a target of exactly one instance at all times. If the sole VM crashes, is terminated, or fails due to a host event, the autoscaler detects the group has dropped below the minimum and provisions a replacement, satisfying the "running at all times" requirement. Because min equals max, the autoscaler will never scale beyond a single instance, which satisfies the "only a single instance per project" constraint. This configuration leverages the autoscaler as the active enforcement mechanism for the desired state, making it the most reliable way to guarantee continuous single-instance operation.
Why the Other Options Are Wrong
Option B (autoscaling Off) does not actively enforce the target size. As XRiddlerX empirically tested in the GCP console and documented with 209 upvotes, deleting an instance in an autoscaling-off MIG did NOT trigger automatic recreation of another instance. Without autoscaling on, the MIG does not proactively restore the instance count when an instance goes away, so the application would remain down until manual intervention — violating the "running at all times" requirement.
Options C and D both allow a maximum of two instances, which directly violates the requirement that "only a single instance of the VM should run per GCP project." Regardless of whether autoscaling is on or off, permitting a second instance is architecturally incompatible with the stated constraint.
As khaliqn noted, "If the VM crashes due to any underlying hardware failure, we want another instance to be added so we need autoscaling ON." While commenters like KerolesKhalil and xaqanik argued that autohealing (a separate feature from autoscaling) could handle VM failure, the question does not mention configuring autohealing, and XRiddlerX's hands-on testing confirmed that autoscaling-off MIGs did not recreate deleted instances. The correct answer within the context of this question is A.
Community Comment Notes
The most compelling evidence comes from XRiddlerX, who performed controlled console tests across all four configurations and found that only options with autoscaling On (A and C) triggered recreation of a deleted instance. KerolesKhalil argued for B on the grounds that "autohealing will start a new instance once the running VM become irresponsive," but this conflates autohealing with autoscaling — autohealing is a separate optional feature that was not mentioned in the question. Here2help pointed out that "you can fall under your min instance number with auto-healing and not with auto-scaling," reinforcing that autoscaling is the mechanism that enforces the minimum size. Anonymous noted the console warning when min equals max, but that warning only means the autoscaler won't scale beyond one instance — it doesn't mean autoscaling is unnecessary. The empirical evidence and consensus from the highest-voted comment converge on answer A.
Official Reference
Exam Strategy
When a question specifies both "must be running at all times" and a strict instance count limit, enable autoscaling with min equal to max to enforce the desired size continuously. Eliminate any option where max exceeds the stated instance limit, since that violates a hard constraint regardless of availability requirements.
Frequently Asked Questions
Why does autoscaling Off fail to recreate a deleted instance in a MIG?
With autoscaling off, the MIG's target size is fixed but not actively enforced. A community member tested this in the GCP console and confirmed that deleting an instance did NOT trigger recreation when autoscaling was disabled.
How does autohealing differ from autoscaling for a single-instance MIG?
Autohealing detects unhealthy instances via health checks and replaces them, while autoscaling enforces the minimum and maximum instance counts. The question doesn't mention autohealing, so autoscaling is the intended mechanism for guaranteed availability.
Related Analysis
Practice All ACE Questions
Access 84 questions with complete answers and detailed explanations.
View Full ACE Practice Test →