Soru

Zorluk: OrtaPlanning Serverless Compute Options (Cloud Run and Cloud Functions)

A cloud engineer at a digital media firm is designing the serverless architecture for a web utility that processes image rendering requests. The application relies on a custom compiled C++ binary and specific Linux system libraries that are not included in standard language runtime environments. Additionally, the workload requires handling multiple concurrent HTTP requests per instance to optimize resource usage and reduce cold starts. Which Google Cloud serverless compute option should the engineer select?

  1. Cloud Run, because it allows deploying custom container images containing any system binary and supports setting concurrency to process multiple requests per container instance simultaneously.Cevap
  2. B
    Cloud Functions, because it automatically packages custom C++ system libraries directly from raw source code and distributes incoming HTTP requests across threads.
  3. C
    Cloud Functions (2nd gen), because 2nd gen functions eliminate the need for containerization while allowing custom binary installations via cloudbuild.yaml deployment files.
  4. D
    Compute Engine Unmanaged Instance Groups, because serverless platforms on Google Cloud cannot run custom compiled binaries or system-level dependencies.

Cevap

The cloud engineer should select Cloud Run because it supports custom container images with arbitrary compiled binaries and allows multi-concurrency per container instance.
Cloud Run is designed to execute stateless OCI-compliant container images. This allows developers to package custom C++ binaries, system libraries, and system configurations. Furthermore, Cloud Run instances can process multiple concurrent requests simultaneously on a single instance, meeting both operational requirements.

Adım Adım Çözüm

1
Analyze the workload requirements
Identified two main constraints: (1) requires custom compiled C++ binary and system libraries, (2) requires handling multiple concurrent HTTP requests per instance.
Serverless choice depends on runtime customization flexibility and concurrency capabilities.
2
Evaluate Google Cloud serverless compute options
Cloud Run accepts any OCI container image, allowing full control over the OS dependencies and binaries while supporting configurable request concurrency.
Cloud Functions relies primarily on standard language runtimes, whereas Cloud Run gives complete container environment control.

Anahtar Kavram

Selecting Cloud Run versus Cloud Functions based on containerization requirements, custom binaries, and request concurrency
Bu soruyu puanla