You are managing an application deployed on Cloud Run for Anthos, and you need to define a strategy for deploying new versions of the application.
You want to evaluate the new code with a subset of production traffic to decide whether to proceed with the rollout.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
The best option to evaluate a new version of an application with a subset of production traffic on Cloud Run for Anthos is to deploy a new revision with the new version and configure traffic percentage between revisions. Option A is the correct answer.
Option A: Deploy a new revision to Cloud Run with the new version. Configure traffic percentage between revisions.
This option involves deploying a new revision of the application on Cloud Run for Anthos, which will be used to evaluate the new code with a subset of production traffic. Cloud Run allows multiple revisions of an application to be deployed simultaneously. Traffic is automatically distributed among these revisions based on the revision's configured percentage of traffic. This option involves configuring the traffic percentage to direct a small percentage of production traffic to the new version, which will allow you to evaluate the new code without affecting the entire production environment. If the new version performs well with the subset of production traffic, you can gradually increase the percentage of traffic directed to it until it's fully rolled out.
Option B: Deploy a new service to Cloud Run with the new version. Add a Cloud Load Balancing instance in front of both services.
This option involves deploying a new service to Cloud Run for Anthos with the new version of the application and adding a Cloud Load Balancing instance in front of both the old and new services. While this option may work, it's unnecessarily complex and can be avoided by simply deploying a new revision of the application and configuring traffic percentage between revisions.
Option C: In the Google Cloud Console page for Cloud Run, set up continuous deployment using Cloud Build for the development branch. As part of the Cloud Build trigger, configure the substitution variable TRAFFIC_PERCENTAGE with the percentage of traffic you want directed to a new version.
This option involves setting up continuous deployment using Cloud Build for the development branch of the application and configuring the substitution variable TRAFFIC_PERCENTAGE to direct a percentage of traffic to a new version. While this option can work, it's overly complex and involves setting up continuous deployment, which may not be necessary for a one-time deployment.
Option D: In the Google Cloud Console, configure Traffic Director with a new Service that points to the new version of the application on Cloud Run. Configure Traffic Director to send a small percentage of traffic to the new version of the application.
This option involves configuring Traffic Director with a new service that points to the new version of the application on Cloud Run for Anthos and directing a small percentage of traffic to the new version. While this option may work, it's again unnecessarily complex and can be avoided by simply deploying a new revision of the application and configuring traffic percentage between revisions.
In conclusion, the best option to evaluate a new version of an application with a subset of production traffic on Cloud Run for Anthos is to deploy a new revision with the new version and configure traffic percentage between revisions.