
Answer-first summary for fast verification
Answer: Deploy the new version of the service to the staging environment. Split the traffic, and allow 1% of traffic through to the latest version. Test the latest version. If the test passes, gradually roll out the latest version to the staging and production environments.
The question focuses on minimizing user and developer impact while testing a new release in staging and production environments for a Cloud Run microservice. Option A is the best approach because it uses a canary deployment strategy with a small traffic split (1%) in staging to test the new version with minimal risk. If tests pass, the gradual rollout to both staging and production ensures controlled exposure, reducing the chance of widespread issues. This leverages Cloud Run's traffic-splitting features for safe, incremental validation. Option B risks high impact by starting with a 50% split. Option C lacks live traffic testing, potentially missing real-world issues. Option D uses a blue-green deployment but abruptly switches all traffic, increasing risk.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are deploying a new release of a microservice on Cloud Run that is used by multiple internal applications. You need to thoroughly test the new version in staging and production environments while minimizing impact on users and developers. What is the best approach to achieve this?
A
Deploy the new version of the service to the staging environment. Split the traffic, and allow 1% of traffic through to the latest version. Test the latest version. If the test passes, gradually roll out the latest version to the staging and production environments.
B
Deploy the new version of the service to the staging environment. Split the traffic, and allow 50% of traffic through to the latest version. Test the latest version. If the test passes, send all traffic to the latest version. Repeat for the production environment.
C
Deploy the new version of the service to the staging environment with a new-release tag without serving traffic. Test the new-release version. If the test passes, gradually roll out this tagged version. Repeat for the production environment.
D
Deploy a new environment with the green tag to use as the staging environment. Deploy the new version of the service to the green environment and test the new version. If the tests pass, send all traffic to the green environment and delete the existing staging environment. Repeat for the production environment.