A media startup stores user-uploaded photos in a Cloud Storage bucket called "photos-uploads." Whenever a new object is created, a 200×200-pixel thumbnail must be produced and saved to another bucket. The team wants to minimize infrastructure management, have the solution scale automatically with sudden traffic spikes, and pay only while their code is executing. Which Google Cloud compute service best meets these requirements?
Create a managed instance group of Compute Engine VMs that continuously poll the bucket and generate thumbnails when new files appear.
Launch a GKE Autopilot cluster and deploy a containerized thumbnail service scaled by a Horizontal Pod Autoscaler subscribed to bucket notifications via Pub/Sub.
Deploy a Cloud Function that is triggered by the Cloud Storage object finalize event to create the thumbnail.
Containerize the thumbnailing code and run it on Cloud Run in an always-on service behind an external HTTP load balancer.
Cloud Functions is designed for lightweight, event-driven workloads. It can be triggered directly by Cloud Storage object creation events, runs only while executing the function code, and scales automatically down to zero when idle-so there are no servers to provision or manage and charges accrue only during execution.
A Cloud Run service in always-on mode removes scale-to-zero cost savings and still requires creating and managing a container plus an HTTP or Pub/Sub trigger. A managed instance group of Compute Engine VMs needs instance provisioning, patching, and capacity planning, incurring costs even when idle. A GKE Autopilot cluster reduces some operational overhead but still involves cluster administration and ongoing node charges. Therefore, Cloud Functions is the most suitable choice.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Cloud Function in Google Cloud?
Open an interactive chat with Bash
How does a Cloud Storage object finalize event work?
Open an interactive chat with Bash
Why is Cloud Run less suitable for this scenario compared to Cloud Functions?
Open an interactive chat with Bash
What is the role of a Cloud Storage object finalize event?
Open an interactive chat with Bash
How does Cloud Functions automatically scale and minimize cost?
Open an interactive chat with Bash
Why isn’t GKE Autopilot or Cloud Run suitable for this use case?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Planning and implementing a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .