Professional Cloud ArchitectManage and provision solution infrastructureMedium
A media company is building a new video processing pipeline on Google Cloud. They need a highly scalable, fully managed, serverless platform to run custom video encoding and transcoding jobs. These jobs are event-driven, triggered by new video uploads to Cloud Storage, and can take varying amounts of time to complete. Which Google Cloud service should they use?
- ACompute Engine with custom instance groups
- BCloud Run
- CCloud Functions
- DGoogle Kubernetes Engine (GKE) Autopilot
Show answer & explanationAnswer & explanation
Correct answer: B. Cloud Run
Cloud Run is a fully managed, serverless platform for stateless containers. It scales automatically from zero to thousands based on demand, supports custom container images, and can be easily triggered by Cloud Storage events, making it ideal for event-driven, variable-duration video processing jobs.
Why the other options are wrong
- A. Compute Engine requires managing virtual machines and scaling policies, which contradicts the 'fully managed, serverless' requirement.
- C. Cloud Functions are suitable for event-driven workloads but are generally designed for shorter-lived, single-purpose functions (up to 9 minutes for Gen1, 60 minutes for Gen2). Video encoding/transcoding jobs can often exceed these limits or require more robust container capabilities.
- D. GKE Autopilot is a managed Kubernetes offering, but it's still a container orchestration platform. While it manages the underlying infrastructure, deploying custom video encoding requires managing Kubernetes resources, which is less 'serverless' than Cloud Run and might be overkill for a single-purpose processing job.
Cloud Run for Event-Driven Processing
Cloud Run is a fully managed serverless platform that allows you to deploy stateless containerized applications. It automatically scales based on demand, from zero to many instances, and can be triggered by various events, making it ideal for event-driven, variable-duration workloads.
- Fully managed and serverless
- Deploys stateless containers
- Scales automatically from zero
- Event-driven (e.g., Cloud Storage, Pub/Sub)
- Supports custom runtimes and languages via containers
Memory trick: Run containers when events arrive, scale to zero and back up.