Soru

Zorluk: KolayManaging Cloud Run Resources

A cloud engineer needs to perform a safe canary release of an updated container image for an existing Cloud Run service named `billing-app`. What is the correct sequence of steps to execute this release from start to finish?

  1. 1Deploy the updated container image as a new revision with the `--no-traffic` flag.
  2. 2Send test HTTP requests to the dedicated revision URL to verify functionality.
  3. 3Update service traffic to route 10% of production traffic to the new revision for canary testing.
  4. 4Update service traffic to direct 100% of live traffic to the new revision.

Cevap

The correct deployment order is to first deploy the container image with the `--no-traffic` flag, second test the revision using its dedicated URL, third split a small percentage of production traffic to the revision for canary testing, and finally shift 100% of live traffic to the new revision.
A standard serverless canary deployment pattern on Cloud Run requires first staging the revision using `--no-traffic`, validating it directly via its unique URL, executing a partial traffic split for canary monitoring, and finally promoting the revision to 100% traffic.

Adım Adım Çözüm

1
Deploy revision with `--no-traffic`
The revision is created safely in an isolated state receiving 0% of main service traffic.
Prevents unvalidated code from serving live production requests.
2
Perform revision-level testing
Sanity checks confirm proper revision initialization and endpoint responses.
Catches startup errors or broken endpoints early in isolation.
3
Configure partial traffic split
10% of production user traffic is routed to the new revision using `gcloud run services update-traffic`.
Allows real-world metric collection and canary testing with minimal impact.
4
Promote revision to 100% traffic
All incoming service traffic shifts to the new revision.
Completes the migration after stability and performance are verified.

Anahtar Kavram

Cloud Run Revision Deployment & Traffic Splitting Workflow
Bu soruyu puanla