Soru

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

An e-commerce platform needs to deploy a stateless microservice on Google Cloud to handle dynamic image transformation requests. The solution must support incoming HTTP/2 traffic with up to 250 concurrent requests per instance, utilize a custom Linux container image containing proprietary pre-compiled C++ binaries, and allow a request timeout of up to 30 minutes for batch image processing. Which Google Cloud compute option should the solution architect choose to meet these requirements?

  1. Cloud Run, because it supports custom container images with arbitrary binary dependencies, high per-instance concurrency, and request timeouts up to 60 minutes.Cevap
  2. B
    Cloud Functions, because serverless execution automatically compiles raw source code and manages custom C++ binary dependencies without needing container packaging.
  3. C
    Compute Engine managed instance groups, because serverless products on Google Cloud cannot handle HTTP request timeouts exceeding 9 minutes.
  4. D
    Cloud Functions, because it provides higher per-instance request concurrency than Cloud Run while enforcing single-thread CPU isolation.

Cevap

Cloud Run, because it supports custom container images with arbitrary binary dependencies, high per-instance concurrency, and request timeouts up to 60 minutes.
Cloud Run is the optimal choice because it runs stateless containers packaging any runtime or binary library (such as C++ dependencies), supports up to 1000 concurrent requests per instance over HTTP/2, and allows request timeouts up to 60 minutes.

Adım Adım Çözüm

1
Analyze workload deployment requirement for custom C++ binaries
Requires bringing a custom Docker container image rather than standard source code runtimes.
Cloud Run allows deploying arbitrary OCI/Docker container images containing pre-compiled binaries, whereas Cloud Functions targets standard language runtimes.
2
Evaluate concurrency and protocol constraints (250 concurrent HTTP/2 requests per instance)
Cloud Run supports up to 1000 concurrent requests per container instance over HTTP/2.
Cloud Run efficiently multiplexes multiple requests onto a single instance to reduce cold starts and lower billing costs.
3
Verify request timeout limitations (30-minute requirement)
Cloud Run supports request timeouts up to 60 minutes (3600 seconds) for HTTP services.
The 30-minute processing requirement falls comfortably within Cloud Run's 60-minute maximum timeout limit.

Anahtar Kavram

Selecting Cloud Run for stateless containerized microservices requiring custom binary dependencies, high concurrency, and extended timeouts.
Bu soruyu puanla