Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
An enterprise is implementing an automated provisioning and elasticity strategy using Terraform to deploy a mission-critical, stateless serving workload across multiple Google Cloud regions. The deployment must satisfy the following architectural requirements:
Which configuration should you define in your Terraform templates to achieve this architecture?
google_compute_instance_template resources per zone, create individual zonal google_compute_instance_group_manager resources in each zone, and attach individual google_compute_autoscaler resources.This approach deploys individual zonal Managed Instance Groups (zonal MIGs) (google_compute_instance_group_manager), placing an independent instance group and zonal autoscaler inside each separate zone rather than using a single regional manager.
EVEN distribution across the region as demand fluctuates.You had workloads that strictly required specific hardware accelerators (like specialized TPUs or GPUs) only available in one specific zone, or if you needed isolated zonal maintenance domains without regional coordination.
Google Cloud recommends regional MIGs over collections of zonal MIGs because regional MIGs natively automate cross-zone provisioning, capacity redistribution, and fault domain management.
google_compute_instance_template, deploy a google_compute_region_instance_group_manager in each region configured with an ANY_SINGLE_ZONE distribution shape, and attach a google_compute_region_autoscaler.The ANY_SINGLE_ZONE distribution shape instructs a regional MIG to create all of its managed VM instances within a single zone in the chosen region, selecting the zone based on quota, resource availability, or reservation alignment.
ANY_SINGLE_ZONE (or ANY), autoscaling is explicitly not supported. Google Cloud requires the target distribution shape to be set to EVEN or BALANCED to enable autoscaling.ANY_SINGLE_ZONE is selected.You were running high-performance computing (HPC) or tightly coupled MPI batch processing tasks that require low latency via compact placement policies within a single zone and do not use autoscaling.
To provide high availability and elastic autoscaling in regional MIGs, always select either the EVEN shape (for balanced multi-zone distribution) or BALANCED shape.
google_compute_instance_template, deploy a google_compute_region_instance_group_manager in each region with an EVEN target distribution shape and an application health check autohealing policy, and attach a google_compute_region_autoscaler.A regional Managed Instance Group (MIG) manages homogeneous Compute Engine virtual machine instances across multiple zones within a single region. The group's VM configuration, including machine type, boot disk image, network settings, and startup metadata, is defined using a global instance template. Elasticity and resilience are managed by coupling the regional MIG manager with a regional autoscaler and an application autohealing policy.
EVEN guarantees that instance counts across selected zones do not differ by more than one instance, ensuring adequate failover capacity during a zonal outage.google_compute_region_autoscaler allows the group to scale out or in dynamically based on metrics such as CPU utilization while respecting the EVEN multi-zone distribution shape.
This pattern represents the Google Cloud architectural best practice for stateless, high-availability web tiers. Regional MIGs combined with EVEN distribution shapes, regional autoscaling, and dedicated autohealing health checks deliver multi-zone fault tolerance and zero-touch elasticity natively.
google_compute_instance_template, deploy a stateful google_compute_region_instance_group_manager in each region configured with stateful disks, and attach a google_compute_region_autoscaler to manage scaling.A Stateful Managed Instance Group (Stateful MIG) is designed for workloads that require preserving unique instance state, such as dedicated instance names, attached stateful persistent disks, or specific metadata, across VM recreation, restarts, or autohealing events.
You were deploying stateful applications like single-node database instances (such as Cassandra, Kafka, or Elasticsearch nodes) that need automatic recovery of persistent data disks in fixed-capacity clusters.
For stateless web services, boot disks and attached volumes should remain stateless so that instances can be rapidly scaled out, destroyed, or recreated from standard base templates.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated