An enterprise financial platform deployed on Google Compute Engine Managed Instance Groups (MIGs) runs an I/O-bound microservice that handles persistent gRPC connections and database transactions. During high-volume marketing campaigns, request latencies increase drastically due to database connection pool exhaustion and thread waiting, but the MIG autoscaler fails to launch additional instances because host CPU utilization stays around 30%. Furthermore, during sudden unexpected traffic spikes, dynamic scaling attempts intermittently stall due to regional compute resource limitations. Which architectural strategy should a Cloud Architect implement to ensure auto-scaling responsiveness and capacity reliability?
- Configure the MIG autoscaler to use custom Cloud Monitoring metrics tracking active database connection pool saturation and pending request queue depth, while requesting regional quota increases and securing reservations prior to peak events.Cevap
- BLower the target CPU utilization threshold on the existing MIG autoscaler from 80% to 25% so that new instances are triggered earlier during I/O wait states.
- CConfigure the autoscaling policy using Cloud Pub/Sub backlog metrics while relying entirely on default dynamic Compute Engine provisioning to scale up to the maximum instance limit during traffic spikes.
- DMigrate the microservice workload to a Google Kubernetes Engine (GKE) Autopilot cluster and configure the Horizontal Pod Autoscaler (HPA) to scale pods strictly using standard cluster memory consumption metrics.
Cevap
Configure the MIG autoscaler to use custom Cloud Monitoring metrics tracking active database connection pool saturation and pending request queue depth, while requesting regional quota increases and securing reservations prior to peak events.
For I/O-bound workloads constrained by database connections or concurrency rather than host processing, CPU metrics do not reflect actual system load. Utilizing custom Cloud Monitoring metrics (such as active connection count or pending queue depth) ensures the autoscaler responds accurately to load increases. Furthermore, proactive capacity planning—including requesting quota adjustments and purchasing reservations—guarantees that Compute Engine has sufficient available resources during large scale-up events.
Adım Adım Çözüm
Anahtar Kavram
Custom Metric Autoscaling & Capacity Reservation