Soru

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

A cloud architecture team is evaluating Google Cloud serverless compute options for a web microservice application. Which TWO requirements make Cloud Run a more suitable choice than Cloud Functions? (Select TWO.)

  1. The application is packaged as a custom container image listening on an HTTP port.Cevap
  2. Each instance must process multiple concurrent HTTP requests simultaneously.Cevap
  3. C
    The workload consists of simple Python event snippets executed directly in response to Pub/Sub messages.
  4. D
    The microservice requires persistent state storage on local disk across instance auto-scaling events.

Cevap

Cloud Run is selected over Cloud Functions when deploying custom container images listening on an HTTP port and when requiring multiple concurrent requests to be processed per instance.
Cloud Run is optimized for executing stateless custom containers that listen on an HTTP port and can handle multiple concurrent requests per instance, reducing total instance footprint and cost.

Adım Adım Çözüm

1
Identify compute packaging and concurrency requirements.
Cloud Run runs arbitrary OCI container images listening on an HTTP port and allows configuring concurrency so a single instance handles multiple simultaneous requests.
Cloud Functions focuses primarily on single-function code snippets rather than full custom web server containers with high concurrency configuration.
2
Evaluate event-handling and state persistence constraints.
Simple event handlers are ideal for Cloud Functions, and local disk persistence is not supported by either serverless platform due to stateless instance lifecycles.
Serverless instances auto-scale dynamically down to zero and replace ephemeral local disk storage upon restart.

Anahtar Kavram

Selecting serverless compute options based on container packaging, concurrency settings, and stateless design
Bu soruyu puanla