Question

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

An enterprise logistics company is planning a serverless compute solution on Google Cloud for two distinct microservices:

1. Service 1: A gRPC-based route planning engine packaged as a custom C++ container binary that requires serving up to 80 concurrent requests per instance.
2. Service 2: A lightweight Python script that must execute automatically in response to file creation events in a Cloud Storage bucket.

Which of the following architectural deployment choices should the cloud engineer select for these workloads? (Select TWO.)

  1. Deploy Service 1 to Cloud Run because it supports custom container runtimes and per-instance request concurrency.Answer
  2. Deploy Service 2 to Cloud Functions using an Eventarc or Cloud Storage event trigger.Answer
  3. C
    Deploy Service 1 to Cloud Functions because Cloud Functions natively executes compiled C++ container images with shared multi-concurrency.
  4. D
    Deploy Service 2 to a Compute Engine Spot VM instance to handle event-driven execution with maximum cost savings.

Answer

The cloud engineer should deploy Service 1 to Cloud Run to support custom container binaries with high concurrency, and deploy Service 2 to Cloud Functions to leverage automatic Cloud Storage event triggers.
Deploying Service 1 to Cloud Run satisfies the requirements for a custom C++ container binary, gRPC protocol support, and multi-concurrency. Deploying Service 2 to Cloud Functions provides a seamless, serverless event-driven mechanism that triggers upon Cloud Storage file uploads.

Step-by-Step Solution

1
Analyze Service 1 requirements.
Service 1 relies on a custom C++ container image, gRPC protocol, and requires multi-concurrency (up to 80 requests per instance).
Cloud Run is the optimal Google Cloud serverless product for custom containers requiring request concurrency and gRPC support.
2
Analyze Service 2 requirements.
Service 2 is a lightweight Python script triggered by object creation events in Cloud Storage.
Cloud Functions provides a simple, managed serverless environment tailored for light event handlers responding directly to Cloud Storage triggers.

Key Concept

Selecting between Cloud Run and Cloud Functions based on container customization, concurrency, and event-triggering models.
Rate this question