Question

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

An enterprise IoT organization is planning the Google Cloud serverless compute architecture for a real-time fleet analytics application. The architecture must support two distinct microservices:

1. Telemetry Streaming Service: Receives high-throughput bi-directional gRPC streaming requests from thousands of connected vehicles simultaneously. It requires a custom-compiled C++ telemetry parsing binary bundled within the execution environment.
2. Audit Logging Service: Executes lightweight Python logic triggered automatically whenever a raw sensor log file is written to a Cloud Storage bucket, extracting metadata and publishing a summary notification without requiring container image build pipelines.

Which of the following architectural decisions should the team select for these workloads? (Select TWO.)

  1. Deploy the Telemetry Streaming Service to Cloud Run, because Cloud Run supports gRPC HTTP/2 bi-directional streaming, custom container runtimes with arbitrary binaries, and high request concurrency per container instance.Answer
  2. B
    Deploy the Telemetry Streaming Service to Cloud Functions (1st gen), because 1st gen functions provide dedicated low-latency hardware isolation specifically optimized for low-level compiled C++ application binaries.
  3. Deploy the Audit Logging Service to Cloud Functions, because it seamlessly handles direct Cloud Storage event triggers and executes code snippets without necessitating custom container management.Answer
  4. D
    Deploy the Audit Logging Service to Compute Engine unmanaged instance groups, because Cloud Storage bucket object notifications cannot directly invoke serverless compute options on Google Cloud.

Answer

Deploy the Telemetry Streaming Service to Cloud Run due to its native support for custom container images, C++ binaries, gRPC bi-directional streaming, and high concurrency. Deploy the Audit Logging Service to Cloud Functions due to its direct event integration with Cloud Storage and zero-container-management overhead for lightweight code snippets.
Cloud Run is ideal for workloads requiring custom OCI container images with compiled binaries (like C++), HTTP/2 gRPC bi-directional streaming, and configurable concurrency. Cloud Functions is ideal for event-driven snippet deployment triggered by Cloud Storage events where managing container images is undesirable.

Step-by-Step Solution

1
Analyze Telemetry Streaming Service requirements
Identified requirements for custom C++ binary dependencies, gRPC bi-directional streaming, and high concurrency per instance.
Cloud Run accepts custom Docker/OCI container images (enabling C++ binaries) and supports HTTP/2 gRPC streaming with up to 250 concurrent requests per container instance.
2
Analyze Audit Logging Service requirements
Identified requirements for Cloud Storage event triggers, simple Python logic, and avoiding container maintenance.
Cloud Functions is designed for simple event-driven code deployment without requiring developers to write Dockerfiles or build/maintain container images.
3
Select the matching architectural decisions
Match Telemetry Streaming to Cloud Run and Audit Logging to Cloud Functions.
This alignment satisfies all operational trade-offs and serverless compute capabilities on GCP.

Key Concept

Selecting Cloud Run vs. Cloud Functions based on containerization, protocol requirements (gRPC/concurrency), and event-driven trigger patterns.
Rate this question