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?
- 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
- BProvision a multi-zone Google Kubernetes Engine (GKE) Autopilot cluster to host both the dashboard microservice and the batch job workloads.
- CDeploy both application components onto persistent Compute Engine Virtual Machines with a 3-year Resource-Based Committed Use Discount (CUD) sized to handle peak traffic.
- DDeploy 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
Anahtar Kavram
Serverless Compute Right-Sizing and Cost Optimization with Cloud Run