Soru

Zorluk: Çok zorDesigning Infrastructure for Business Requirements and Cost Optimization

A digital media analytics company provides on-demand data visualization dashboards and executes nightly batch calculations for enterprise clients. The dashboard query microservice receives highly intermittent HTTPS traffic, experiencing long periods of zero incoming requests during off-peak hours. The nightly batch calculations run once per day for 45 minutes on structured datasets. The organization aims to strictly optimize infrastructure expenditure by eliminating payments for idle capacity, while also minimizing operational management overhead for the cloud engineering team. Which architectural approach fulfills these business and cost constraints?

  1. Deploy the dashboard microservice to Cloud Run to leverage automatic scale-to-zero capacity, and execute the nightly batch processing as a Cloud Run Job.Cevap
  2. B
    Provision a multi-zone Google Kubernetes Engine (GKE) Autopilot cluster to host both the dashboard microservice and the batch job workloads.
  3. C
    Deploy both application components onto persistent Compute Engine Virtual Machines with a 3-year Resource-Based Committed Use Discount (CUD) sized to handle peak traffic.
  4. D
    Deploy the dashboard microservice to Cloud Run and migrate the backend relational dataset from Cloud SQL for PostgreSQL to a multi-region Cloud Spanner instance.

Cevap

Deploy the dashboard microservice to Cloud Run to leverage automatic scale-to-zero capacity, and execute the nightly batch processing as a Cloud Run Job.
The combination of Cloud Run for the web microservice and Cloud Run Jobs for the scheduled batch task provides a completely serverless architecture. Cloud Run automatically scales compute resources to zero when no HTTPS requests are active, ensuring zero compute expenditure during idle hours. Cloud Run Jobs run containerized tasks to completion and terminate immediately, avoiding persistent server costs and eliminating cluster management overhead.

Adım Adım Çözüm

1
Analyze compute workload traffic patterns and cost constraints.
The dashboard endpoint is highly intermittent (requiring scale-to-zero), and the batch process is short-lived (45 minutes per day).
Traditional VM instance sizing or continuously running container clusters incur sustained compute costs during idle windows.
2
Evaluate serverless compute options against management overhead.
Cloud Run scales to zero instances during zero-request periods, and Cloud Run Jobs execute task containers on demand without requiring active cluster nodes.
This fully satisfies the cost optimization objective by charging strictly for CPU/memory consumption during execution.
3
Compare against alternatives such as GKE, Committed Use Discounts, and Cloud Spanner.
GKE adds cluster baseline overhead, CUDs lock in idle capacity payment, and Cloud Spanner introduces unnecessary database provisioning costs.
Selecting fully managed serverless components achieves maximum cost efficiency and minimal operational toil.

Anahtar Kavram

Serverless Compute Right-Sizing and Cost Optimization with Cloud Run
Bu soruyu puanla