An organization is architecting two backend workloads for an e-commerce platform on Google Cloud:
1. Component 1: A lightweight, event-driven task triggered by file uploads to Cloud Storage that extracts image metadata in under 5 seconds.
2. Component 2: A web-facing invoice rendering service requiring custom Linux dynamic C++ system libraries, WebSocket support, and handling up to 80 concurrent HTTP requests per instance.
Which two deployment strategies represent the optimal serverless compute choices for these components on Google Cloud? (Select TWO.)
- Deploy Component 1 to Cloud Functions (2nd gen) using an Eventarc trigger for Cloud Storage events.Answer
- Deploy Component 2 to Cloud Run packaged inside a custom container image.Answer
- CDeploy Component 2 to Cloud Functions (2nd gen) by uploading raw compiled C++ source code.
- DDeploy Component 1 to a Compute Engine Managed Instance Group (MIG) configured with low CPU threshold autoscaling.
Answer
Deploy Component 1 to Cloud Functions (2nd gen) using an Eventarc trigger for Cloud Storage events, and deploy Component 2 to Cloud Run packaged inside a custom container image.
Cloud Functions (2nd gen) is designed for event-driven snippet execution integrated with Cloud Storage via Eventarc. Cloud Run is designed for containerized applications, supporting custom binaries, dynamic system libraries, WebSockets, and multi-concurrency (up to 250 concurrent requests per instance).
Step-by-Step Solution
Key Concept
Selecting serverless compute options between Cloud Run and Cloud Functions based on execution paradigm, container customizability, event integration, and concurrency requirements.