Google Cloud Professional Cloud Developer — Question 314
You have an application running in production on Cloud Run. Your team needs to change one of the application’s services to return a new field. You want to test the new revision on 10% of your clients using the least amount of effort. You also need to keep your service backward compatible.
What should you do?
Answer options
- A. Replace the current service with the new revision. Deploy the new revision with no traffic allocated. After the deployment, split the traffic between the previous service and the new revision.
- B. Update the current service with the new changes. Deploy the new revision. After the deployment, split the traffic between the current service and the new revision.
- C. Update the current service with the new changes. Deploy the new revision with no traffic allocated. Split the traffic between the current service and the new revision.
- D. Replace the current service with the new revision. Deploy the new revision. Create a load balancer to split the traffic between the previous service and the new revision.
Correct answer: C
Explanation
Option C is correct because it allows for the new revision to be deployed without traffic initially, ensuring backward compatibility while gradually introducing the change to 10% of users. Option A incorrectly deploys the new revision before traffic allocation, and option B does not maintain the backward compatibility as it updates the current service directly. Option D adds unnecessary complexity with a load balancer, which is not required for this scenario.