Skip to Content

Google Professional Cloud Developer: How to Test New Revision on Cloud Run with Minimal Effort and Maintain Backward Compatibility?

Learn the most efficient way to test a new revision of your Cloud Run application on a small percentage of clients while keeping the service backward compatible. Discover the best practices for deploying and managing traffic between revisions.

Table of Contents

Question

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?

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.

Answer

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.

Explanation

To test the new revision of your Cloud Run application on 10% of your clients with the least effort while maintaining backward compatibility, the best approach is to follow these steps:

  1. Update the current service with the new changes, including the new field that needs to be returned. This ensures that the service remains backward compatible, as the existing clients will still be able to interact with the service without any issues.
  2. Deploy the new revision with no traffic allocated. This means that the new revision will be deployed, but it won’t receive any traffic initially. By doing this, you can ensure that the new revision is up and running without affecting the current service.
  3. Split the traffic between the current service and the new revision. After deploying the new revision, you can use the traffic splitting feature of Cloud Run to allocate a small percentage of traffic (in this case, 10%) to the new revision. This allows you to test the new revision with a subset of your clients while the majority of the traffic still goes to the current service.

By following this approach, you can gradually introduce the new revision to a small group of clients, monitor its performance and functionality, and ensure that it meets your expectations. If any issues arise, you can quickly roll back the traffic to the previous revision without affecting the entire user base.

This method is the most efficient way to test the new revision because it minimizes the effort required for deployment and traffic management. You don’t need to create a separate load balancer or replace the current service entirely, which would be more time-consuming and complex.

In summary, updating the current service with the new changes, deploying the new revision with no traffic allocated, and then splitting the traffic between the current service and the new revision is the best approach for testing the new revision on a small percentage of clients while maintaining backward compatibility and minimizing effort.

Google Professional Cloud Developer certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Google Professional Cloud Developer exam and earn Google Professional Cloud Developer certification.