An enterprise developer needs to migrate a legacy web service to a Google Cloud serverless platform. The application is packaged as a custom Docker container image containing compiled C++ binaries and system-level C libraries. The service handles HTTP requests that can each take up to 45 minutes to process. To optimize cost efficiency during peak traffic, each deployed compute instance must handle up to 80 concurrent HTTP requests simultaneously, while scaling down completely to zero instances during idle periods with zero underlying server maintenance. Which Google Cloud compute solution best satisfies these architectural requirements?
- Deploy the containerized application to Cloud Run, configuring instance concurrency to 80 and setting the HTTP request timeout to 45 minutes.Answer
- BDeploy the application code to Cloud Functions (1st gen) with an HTTP trigger, enabling multi-request concurrency and setting the function execution timeout to 45 minutes.
- CDeploy the application to Cloud Functions (2nd gen) by packaging the compiled C++ binary into a ZIP archive wrapper with a Node.js runtime script.
- DDeploy the containerized workload to Compute Engine Managed Instance Groups (MIGs) with an HTTP(S) Load Balancer and autoscaling policy set to scale to zero instances.
Answer
Deploy the containerized application to Cloud Run, configuring instance concurrency to 80 and setting the HTTP request timeout to 45 minutes.
Deploying the containerized application to Cloud Run satisfies all constraints. Cloud Run allows running arbitrary container images with custom C++ binaries, supports setting HTTP request execution timeouts up to 60 minutes (exceeding the required 45 minutes), allows configuring instance concurrency to handle multiple requests (80) per container instance, scales down to zero when no traffic arrives, and eliminates infrastructure management overhead.
Step-by-Step Solution
Key Concept
Selecting Cloud Run versus Cloud Functions based on containerization, concurrency, and request execution timeout requirements.