A company runs an I/O-bound web service on a Compute Engine Managed Instance Group (MIG). During traffic spikes, request latency increases due to network socket exhaustion, while average CPU utilization on the instances remains below 30%. Which autoscaling configuration should you implement to scale the instances effectively?
- Configure the MIG autoscaler using a custom Cloud Monitoring metric that measures request queue depth or active connections.Answer
- BConfigure the MIG autoscaler using a standard target CPU utilization threshold of 80%.
- CMigrate the web service to Google Kubernetes Engine (GKE) with horizontal pod autoscaling to handle microservice scaling automatically.
- DMaintain static instance counts on the MIG and request a regional compute quota increase right before traffic spikes occur.
Answer
Configure the MIG autoscaler using a custom Cloud Monitoring metric that measures request queue depth or active connections.
For I/O-bound applications, traditional CPU utilization metrics do not reflect true workload pressure. Exporting custom metrics such as request queue depth or connection counts to Cloud Monitoring enables the Managed Instance Group autoscaler to scale based on the actual resource bottleneck.
Step-by-Step Solution
Key Concept
Custom metric autoscaling for I/O-bound workloads