Google Associate Cloud Engineer Question 217
Single answerGoogle Cloud PlatformYou are tasked with deploying a new version of your application on Cloud Run. The application is currently receiving traffic, and you want to ensure that there is no downtime during the transition. What is the best approach to deploy the new version ensuring a smooth transition?
- A
Deploy the new version and manually split the traffic to it.
- B
Deploy the new version and set it as the latest revision, allowing Cloud Run to automatically direct all traffic to it.
- C
Deploy the new version and gradually shift traffic from the old version to the new version using traffic splitting.
- D
Delete the old version after deploying the new version to ensure all traffic goes to the new version.
Show answer and explanation
Correct answer: C
Explanation
The best practice for deploying a new version of an application on Cloud Run without downtime is to use traffic splitting. This approach allows you to gradually shift a percentage of traffic from the old version to the new version. It provides an opportunity to monitor the new version's performance and rollback if there are issues, ensuring a smooth transition.
- A. Incorrect.
Deploying the new version and manually splitting traffic could lead to errors if not done carefully.
- B. Incorrect.
Setting the new version as the latest revision could cause downtime as traffic is immediately switched.
- C. Correct.
Gradually shifting traffic using traffic splitting ensures that there is no downtime and allows for monitoring of the new version's performance.
- D. Incorrect.
Deleting the old version immediately can lead to downtime if the new version has issues.