Question

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

A financial analytics firm is planning the deployment of two backend components for a new serverless application on Google Cloud:

1. Component 1: A report generator service that executes a custom-compiled Linux C++ executable requiring specific OS system libraries packaged in a container.
2. Component 2: A lightweight event processing snippet that parses JSON data whenever a new message is published to a Cloud Pub/Sub topic.

Which TWO architectural decisions should the cloud engineer select to meet these requirements with minimal operational management? (Select TWO.)

  1. Deploy Component 1 to Cloud Run using a custom container image.Answer
  2. Deploy Component 2 to Cloud Functions (2nd gen) triggered by Cloud Pub/Sub.Answer
  3. C
    Deploy Component 1 to Cloud Functions (1st gen) by uploading the compiled binary inside an inline zip archive.
  4. D
    Deploy Component 2 to Compute Engine virtual machines configured with Managed Instance Groups.

Answer

Deploy the report generator service (Component 1) to Cloud Run using a custom container image, and deploy the event-driven parser (Component 2) to Cloud Functions (2nd gen) triggered by Cloud Pub/Sub.
Cloud Run executes arbitrary Docker container images, providing full control over system libraries and custom binaries needed by the report generator service. Cloud Functions (2nd gen) integrates natively with Eventarc and Pub/Sub, providing a fully managed serverless environment ideal for lightweight event handler snippets without container maintenance.

Step-by-Step Solution

1
Analyze requirement for Component 1
Component 1 requires custom C++ binaries and Linux OS system libraries.
Cloud Run is designed to run any containerized application, satisfying requirements for custom runtime dependencies and native binaries.
2
Analyze requirement for Component 2
Component 2 requires lightweight event-driven execution triggered by Pub/Sub.
Cloud Functions offers a simplified function-as-a-service paradigm for handling asynchronous GCP events with minimal boilerplate.

Key Concept

Selecting serverless compute platforms based on containerization requirements, custom OS library dependencies, and event-driven trigger patterns.
Rate this question