Soru

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

A digital publishing company is architecting serverless compute solutions for two new services on Google Cloud:

1. Service 1: An interactive web API that requires handling up to 250 concurrent HTTP requests per container instance to optimize resource utilization.
2. Service 2: A lightweight background script that executes automatically whenever a raw text file is uploaded to a Cloud Storage bucket.

Which TWO deployment decisions correctly align with Google Cloud serverless compute capabilities for these services?

  1. Deploy Service 1 to Cloud Run because Cloud Run natively supports receiving multiple concurrent requests on a single container instance.Cevap
  2. B
    Deploy Service 1 to Cloud Functions (1st gen) because 1st gen Cloud Functions support up to 1,000 concurrent requests per instance by default.
  3. Deploy Service 2 to Cloud Functions because it directly integrates with Cloud Storage event triggers for automatic execution upon file upload.Cevap
  4. D
    Deploy Service 2 to Compute Engine virtual machines because serverless products cannot respond to Cloud Storage object creation events.

Cevap

Deploying Service 1 to Cloud Run to leverage container instance concurrency, and deploying Service 2 to Cloud Functions to take advantage of native Cloud Storage event triggers.
Cloud Run is ideal for stateless HTTP workloads requiring multi-concurrency per container instance. Cloud Functions is ideal for event-driven background processing triggered directly by Google Cloud services such as Cloud Storage object mutations.

Adım Adım Çözüm

1
Analyze Service 1 requirements
Service 1 requires high HTTP concurrency per instance (up to 250 requests).
Cloud Run is designed to handle multi-concurrency within a single container instance, whereas 1st-gen Cloud Functions are strictly single-concurrency.
2
Analyze Service 2 requirements
Service 2 requires lightweight, event-driven execution triggered by Cloud Storage file uploads.
Cloud Functions excels at event-driven tasks triggered directly by Google Cloud service events like Cloud Storage bucket object creations.

Anahtar Kavram

Selecting between Cloud Run and Cloud Functions based on concurrency and event-driven trigger requirements
Bu soruyu puanla