A healthcare technology startup is deploying a simple, stateless HTTP microservice for sending patient notification messages. The service experiences variable traffic during business hours and extended periods of zero activity overnight. The startup needs to minimize infrastructure costs by ensuring compute charges drop to zero when no requests are being processed, while also eliminating cluster management overhead. Which Google Cloud compute solution best fulfills these requirements?
- Deploy the microservice on Cloud Run.Answer
- BDeploy the microservice on a Google Kubernetes Engine (GKE) cluster with Cluster Autoscaler enabled.
- CProvision a persistent Compute Engine virtual machine instance backed by a 3-year Committed Use Discount.
- DDeploy the microservice application logic directly inside a Cloud Spanner database cluster.
Answer
Deploying the microservice on Cloud Run best fulfills the business requirements by automatically scaling down to zero instances during idle periods to eliminate compute charges and removing infrastructure management overhead.
Deploying the microservice on Cloud Run is the optimal solution because Cloud Run is a fully managed serverless execution environment. It automatically scales stateless containerized HTTP workloads down to zero instances when no requests are being served, ensuring zero infrastructure costs during idle periods while completely abstracting infrastructure management.
Step-by-Step Solution
Key Concept
Cloud Run Serverless Compute for Cost Optimization