Question

Difficulty: HardPlanning Serverless Compute Options (Cloud Run and Cloud Functions)

An enterprise architecture team is planning the serverless compute deployment strategy for two distinct workloads:

• Workload 1: A real-time telemetry ingestion service requiring persistent WebSocket connections, custom C-based system dependencies, and high per-instance concurrency.
• Workload 2: A stateless background worker processing individual object creation events from a Google Cloud Storage bucket.

Which TWO architectural decisions correctly satisfy these operational requirements using Google Cloud serverless services? (Select TWO.)

  1. Deploy Workload 1 to Cloud Run, because Cloud Run supports custom container images, WebSocket connections, and configurable multi-concurrency per instance.Answer
  2. B
    Deploy Workload 1 to Cloud Functions (1st gen), because it natively handles custom Linux binary dependencies and multi-threaded WebSocket connections.
  3. Deploy Workload 2 to Cloud Functions (2nd gen) or Cloud Run triggered via Eventarc, because both serverless platforms natively process Cloud Storage event notifications.Answer
  4. D
    Deploy Workload 2 to Compute Engine Managed Instance Groups (MIGs), because Google Cloud serverless options cannot receive event notifications from Cloud Storage.

Answer

Deploy Workload 1 to Cloud Run to support custom container dependencies, WebSockets, and multi-concurrency. Deploy Workload 2 to Cloud Functions (2nd gen) or Cloud Run using Eventarc triggers for event-driven storage processing.
Cloud Run is required for Workload 1 because it allows custom container packaging for system-level dependencies, supports persistent WebSocket connections, and enables configurable multi-concurrency. Cloud Functions (2nd gen) or Cloud Run combined with Eventarc is optimal for Workload 2 because both provide seamless serverless execution in response to Cloud Storage events.

Step-by-Step Solution

1
Analyze the runtime requirements for Workload 1.
Workload 1 demands custom OS libraries (C-based dependencies), persistent WebSockets, and multi-concurrency per instance.
Cloud Run accepts arbitrary Docker images (enabling custom OS packages) and supports long-lived streaming connections (WebSockets) with concurrency up to 1000 requests per instance.
2
Analyze the operational requirements for Workload 2.
Workload 2 is a stateless background worker responding to Cloud Storage bucket object events.
Cloud Functions (2nd gen) and Cloud Run both integrate with Eventarc to process storage mutations automatically without maintaining permanent VM infrastructure.
3
Synthesize the serverless compute architecture choice.
Select Cloud Run for Workload 1, and Cloud Functions (2nd gen) or Cloud Run for Workload 2.
This alignment matches workload technical constraints to the capabilities of GCP serverless execution paradigms.

Key Concept

Evaluating serverless execution paradigms (Cloud Run vs Cloud Functions) based on container customization, protocol requirements (WebSockets), concurrency settings, and event-driven trigger integrations.
Rate this question