Soru

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

A software engineering team is planning the deployment architecture for an internal HTTP REST API on Google Cloud. The application requires a custom Go runtime packaged alongside specific Linux system libraries compiled directly into a container image. To optimize operational costs during traffic spikes, the service must support handling up to 80 concurrent HTTP requests on each active instance. Which serverless compute option should the team select?

  1. Deploy the container image to Cloud Run, as it natively supports custom container runtimes and configurable multi-concurrency per instance.Cevap
  2. B
    Deploy the application code to Cloud Functions (1st gen), as it automatically provides container runtime customization and multi-concurrency by default.
  3. C
    Deploy the application code to Cloud Functions (2nd gen) with Cloud Storage triggers, because custom Linux libraries cannot be included in Cloud Run.
  4. D
    Deploy the application to Compute Engine Spot VMs behind an HTTP Load Balancer, because serverless platforms on Google Cloud do not support HTTP microservices.

Cevap

Deploy the container image to Cloud Run, as it natively supports custom container runtimes and configurable multi-concurrency per instance.
Cloud Run is Google Cloud's serverless platform for deploying arbitrary container images that listen for incoming HTTP/gRPC requests. It allows teams to bring custom binaries and system libraries in a Dockerfile while supporting multi-concurrency configuration (handling multiple simultaneous requests on a single instance) for high efficiency.

Adım Adım Çözüm

1
Identify key technical and operational requirements
The application needs custom container image support (Linux system libraries compiled with Go) and configurable multi-concurrency (80 requests per instance) over HTTP.
Understanding runtime requirements and concurrency needs is critical when choosing between serverless options on GCP.
2
Evaluate GCP serverless platform capabilities
Cloud Run executes any container image that listens on the PORT environment variable and allows configuring concurrency up to 1000 requests per container instance.
Cloud Functions focuses on deploying source code snippets for event processing, whereas Cloud Run is designed for arbitrary containerized web applications.
3
Select the optimal compute solution
Cloud Run is the correct platform because it fulfills both container customization and multi-concurrency requirements.
Cloud Run provides serverless autoscaling without server management while supporting custom containerized environments.

Anahtar Kavram

Planning Serverless Compute Options (Cloud Run vs Cloud Functions)
Bu soruyu puanla