A healthcare startup is deploying a containerized RESTful API microservice to Google Cloud. The application experiences unpredictable HTTP traffic spikes throughout the day and prolonged periods of zero traffic at night. The team requires a compute solution that automatically scales to zero when idle, executes existing container images without code refactoring, and requires zero cluster or server management overhead. Which compute solution should the cloud engineer select?
- ADeploy the microservice as a Managed Instance Group (MIG) of Compute Engine Spot VMs behind an External HTTP(S) Load Balancer.
- BDeploy the microservice to a Google Kubernetes Engine (GKE) Standard cluster configured with Cluster Autoscaler.
- Deploy the microservice container directly to Cloud Run.Answer
- DRefactor the microservice API routes into individual Cloud Functions triggered by Cloud Pub/Sub topics.
Answer
Deploy the microservice container directly to Cloud Run.
Deploying the container to Cloud Run satisfies all scenario requirements. Cloud Run runs stateless container images directly without code changes, automatically scales down to zero instances when idle to minimize costs, handles rapid spikes in HTTP traffic, and abstracts away all cluster management and node maintenance.
Step-by-Step Solution
Key Concept
Selecting serverless compute services (Cloud Run vs. GKE vs. Compute Engine) for containerized HTTP workloads based on operational overhead and scaling requirements.