Google Associate Cloud Engineer Question 215
Select 3Google Cloud PlatformYou are managing a Cloud Run application that requires zero downtime during new version deployments. Which of the following steps should you take to ensure traffic is gradually shifted to the new version, allowing you to monitor performance before a full rollout?
- A
A. Deploy the new version and set the traffic percentage to 100% for the new revision.
- B
B. Deploy the new version and use traffic splitting to gradually increase the traffic to the new revision.
- C
C. Use Cloud Run's roll-back feature to revert to the previous version if issues arise.
- D
D. Deploy the new version and immediately remove the old version.
- E
E. Monitor the application using Cloud Monitoring during the traffic shift.
Show answer and explanation
Correct answers: B, C, E
Explanation
To ensure zero downtime during deployments on Cloud Run, it's important to use traffic splitting to gradually shift traffic to the new version. This approach allows monitoring of the new version's performance before fully committing, and provides an opportunity to rollback if necessary. Continuous monitoring with Cloud Monitoring is crucial to detect any issues early in the deployment process.
- A. Incorrect.
Option A is incorrect because setting the traffic percentage to 100% immediately does not allow for gradual traffic shifting, which is essential for zero downtime and monitoring.
- B. Correct.
Option B is correct because using traffic splitting allows you to gradually increase the traffic to the new revision, which is necessary for a smooth transition and monitoring.
- C. Correct.
Option C is correct because Cloud Run provides a roll-back feature, which is useful to revert to the previous version if issues are detected during the gradual rollout.
- D. Incorrect.
Option D is incorrect because immediately removing the old version does not provide a fallback if the new version has issues, which could lead to downtime.
- E. Correct.
Option E is correct because monitoring the application during the traffic shift allows you to detect and respond to any performance issues that may arise.