Soru

Zorluk: Çok zorAuto-scaling and Capacity Planning

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?

  1. 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
  2. B
    Lower 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.
  3. C
    Configure 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.
  4. D
    Migrate 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

1
Analyze workload resource bottlenecks.
Identified that the service is I/O-bound, meaning host CPU utilization remains low even when connection pools and request queues are saturated.
Standard CPU metrics are ineffective for autoscaling workloads constrained by network, database connections, or thread waiting.
2
Select appropriate autoscaling metric signals.
Expose application-level custom metrics (connection pool utilization, queue depth) to Cloud Monitoring and target these in the MIG autoscaling policy.
Custom metrics accurately reflect true application load and trigger scaling before user latency degrades.
3
Address capacity and quota limitations for peak events.
Verify regional compute quotas and acquire On-Demand or Compute Engine Reservations in advance of anticipated events.
Autoscaling policies cannot provision instances beyond project quotas or regional physical resource availability.

Anahtar Kavram

Custom Metric Autoscaling & Capacity Reservation
Bu soruyu puanla