Question

Difficulty: MediumPlanning and Assessing Cloud Compute Solutions

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?

  1. A
    Deploy the microservice as a Managed Instance Group (MIG) of Compute Engine Spot VMs behind an External HTTP(S) Load Balancer.
  2. B
    Deploy the microservice to a Google Kubernetes Engine (GKE) Standard cluster configured with Cluster Autoscaler.
  3. Deploy the microservice container directly to Cloud Run.Answer
  4. D
    Refactor 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

1
Analyze the workload characteristics and operational constraints.
The application is a containerized HTTP microservice requiring scale-to-zero capabilities, support for sudden traffic bursts, and zero server/cluster management.
Identifying container support, scaling behavior, and management overhead constraints guides the selection of the optimal Google Cloud compute platform.
2
Evaluate potential compute platforms against the requirements.
Compute Engine requires OS/VM maintenance and cannot scale to zero. GKE Standard involves node pool cluster operations. Cloud Functions requires refactoring containerized multi-route APIs into event-driven code snippets. Cloud Run supports existing containers, scales down to zero, and is fully managed.
Cloud Run fits all criteria without requiring code changes or infrastructure administration.

Key Concept

Selecting serverless compute services (Cloud Run vs. GKE vs. Compute Engine) for containerized HTTP workloads based on operational overhead and scaling requirements.
Rate this question