Question

Difficulty: Very hardManaging Cloud Run Resources

To accommodate an upcoming peak workload, a cloud infrastructure engineer must release a performance-tuned container image `gcr.io/prod-project/event-handler:v2` as a new revision for an existing Cloud Run service named `event-handler`. The operational specification demands that the new container revision must maintain a minimum of 5 warm instances, process up to 250 concurrent requests per container instance, and initially receive exactly 15% of live production traffic, with the remaining 85% remaining assigned to the baseline revision `event-handler-v1`. Which command execution workflow correctly implements this deployment without inadvertently routing 100% of live traffic to the new revision upon deployment?

  1. A
    Execute `gcloud run deploy event-handler --image gcr.io/prod-project/event-handler:v2 --concurrency 250 --min-instances 5` followed by `gcloud run services update-traffic event-handler --to-revisions event-handler-v1=85,LATEST=15`
  2. B
    Execute `gcloud run deploy event-handler --image gcr.io/prod-project/event-handler:v2 --port 250 --min-instances 5 --no-traffic` followed by `gcloud run services update-traffic event-handler --to-revisions event-handler-v1=85,event-handler-v2=15`
  3. Execute `gcloud run deploy event-handler --image gcr.io/prod-project/event-handler:v2 --concurrency 250 --min-instances 5 --no-traffic` followed by `gcloud run services update-traffic event-handler --to-revisions event-handler-v1=85,event-handler-v2=15`Answer
  4. D
    Execute `gcloud functions deploy event-handler --image gcr.io/prod-project/event-handler:v2 --concurrency 250 --min-instances 5` followed by `gcloud run services update-traffic event-handler --to-revisions event-handler-v1=85,event-handler-v2=15`

Answer

Deploy the new revision using `gcloud run deploy event-handler --image gcr.io/prod-project/event-handler:v2 --concurrency 250 --min-instances 5 --no-traffic`, then update the traffic allocation using `gcloud run services update-traffic event-handler --to-revisions event-handler-v1=85,event-handler-v2=15`.
The correct option deploys the revision while suppressing immediate traffic assignment via `--no-traffic`, configures container concurrency (`--concurrency 250`) and minimum warm instances (`--min-instances 5`), and subsequently executes `gcloud run services update-traffic` to split live traffic between `event-handler-v1` (85%) and `event-handler-v2` (15%).

Step-by-Step Solution

1
Deploy the new container image revision with configuration flags and traffic prevention.
Revision `event-handler-v2` is created with 250 max concurrency and 5 minimum warm instances, receiving 0% traffic.
The `--no-traffic` flag prevents Cloud Run's default behavior of automatically directing 100% of live traffic to newly deployed revisions.
2
Execute the traffic update command referencing the explicit revision identifiers and percentage split.
Production traffic is updated so that `event-handler-v1` serves 85% and `event-handler-v2` serves 15%.
The `gcloud run services update-traffic` command allows precise canary traffic splitting across revision names.

Key Concept

Cloud Run Revision Management, Concurrency Settings, and Traffic Splitting
Rate this question