Question

Difficulty: EasyDesigning Infrastructure for Business Requirements and Cost Optimization

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?

  1. Deploy the microservice on Cloud Run.Answer
  2. B
    Deploy the microservice on a Google Kubernetes Engine (GKE) cluster with Cluster Autoscaler enabled.
  3. C
    Provision a persistent Compute Engine virtual machine instance backed by a 3-year Committed Use Discount.
  4. D
    Deploy 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

1
Analyze workload traffic profile and operational requirements.
The application is a stateless HTTP microservice with intermittent daytime traffic and long idle overnight periods.
Understanding the traffic pattern determines whether dedicated continuous infrastructure or serverless scale-to-zero compute is optimal.
2
Evaluate Google Cloud compute options against cost and management goals.
Cloud Run bills strictly per request and CPU/memory usage during request processing, scaling to zero when idle.
Aligns directly with the requirement to pay zero dollars during periods of inactivity.
3
Verify operational overhead for the selected platform.
Cloud Run manages server provisioning, patching, and scaling automatically without requiring GKE cluster or VM administration.
Meets the startup's constraint of eliminating operational and cluster management overhead.

Key Concept

Cloud Run Serverless Compute for Cost Optimization
Rate this question