Google Professional Cloud Network Engineer Question 732
Select 2Google Cloud PlatformYour organization is migrating traffic from an old version of a microservice to a new version. Both versions are deployed behind a Google Cloud HTTP(S) Application Load Balancer. You want to gradually redirect traffic from the old version to the new version while ensuring no user requests are abruptly terminated. How can you achieve this using the Application Load Balancer?
- A
Configure a traffic-splitting rule in the Load Balancer's backend service to direct a percentage of traffic to the new version.
- B
Set up a new URL map to route all traffic immediately to the new version.
- C
Enable connection draining on the backend service and specify a draining timeout to allow existing connections to gracefully complete during the migration.
- D
Update the Load Balancer's frontend configuration to forward traffic only to the new version once the old version is disabled.
- E
Use a session affinity policy to ensure that user sessions are not interrupted during the migration.
Show answer and explanation
Correct answers: A, C
Explanation
To safely migrate traffic between two versions of a service behind an Application Load Balancer, you can use traffic splitting to gradually redirect traffic and connection draining to allow existing connections to complete without disruption. This ensures a smooth transition for users while minimizing service interruptions.
- A. Correct.
Correct: Configuring a traffic-splitting rule allows you to gradually direct a percentage of traffic to the new version, making it a suitable approach for safe migration.
- B. Incorrect.
Incorrect: Creating a new URL map would immediately redirect all traffic to the new version, which does not allow a gradual transition or ensure graceful handling of ongoing requests.
- C. Correct.
Correct: Enabling connection draining ensures that existing connections to the old version can complete gracefully, reducing the risk of user interruptions during the migration.
- D. Incorrect.
Incorrect: Updating the frontend configuration to forward traffic to the new version abruptly cuts off traffic to the old version, which does not align with the requirement for a gradual migration.
- E. Incorrect.
Incorrect: While session affinity can help maintain consistency for user sessions, it does not address the gradual traffic redirection or connection draining required for this scenario.