Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
Your organization operates a global, mission-critical application hosted on Google Cloud using Compute Engine Managed Instance Groups (MIGs) behind an external Application Load Balancer. To improve release velocity and prevent customer-facing incidents, the SRE team requires the deployment pipeline to automate canary deployments, metric validation, and traffic draining.
The automated CI/CD workflow must satisfy the following criteria:
Which strategy should you integrate into your CI/CD pipeline to orchestrate this automated traffic draining and canary workflow?
Configure URL map weighted backend service routing on the load balancer, use pipeline automation to adjust traffic percentages, evaluate canary health metrics via Cloud Monitoring, and leverage Backend Service Connection Draining timeouts during rollback or final cutover.
Configure Cloud DNS weighted round-robin routing policies with a 5-second TTL pointing directly to the external IP addresses of individual Compute Engine instances, using CI/CD scripts to adjust DNS record weights and drain instances.
Deploy an iptables redirection sidecar script on all Compute Engine VMs, executing CI/CD remote SSH commands during deployment to locally route 5% of incoming traffic to a newly deployed canary container port.
Configure a Managed Instance Group rolling update with proactive updates, setting maxSurge to 5% and maxUnavailable to 0%, letting the instance group manager handle automated instance replacement and health check validation.
Configure URL map weighted backend service routing on the load balancer, use pipeline automation to adjust traffic percentages, evaluate canary health metrics via Cloud Monitoring, and leverage Backend Service Connection Draining timeouts during rollback or final cutover.
URL map traffic splitting (weighted backend services) is a native Google Cloud Application Load Balancer feature that allows incoming HTTP(S) traffic to be distributed across multiple backend services according to configurable percentage weights. Connection draining is a backend service setting that ensures in-flight TCP/HTTP requests are given a configured duration (e.g., 300 seconds) to complete cleanly when a backend service or instance group is removed or its weight is reduced to zero.
95% of traffic to the baseline backend service and 5% to the canary backend service.0%. The Application Load Balancer stops routing new requests to the canary while honoring active connections through Connection Draining.100%, sets legacy backend service weight to 0%, and waits for the connection draining timeout to elapse before tearing down the legacy Managed Instance Group.This approach decouples infrastructure provisioning from traffic shifting, providing precise Layer 7 traffic routing control and automated draining natively supported by Google Cloud's network data plane.
Configure Cloud DNS weighted round-robin routing policies with a 5-second TTL pointing directly to the external IP addresses of individual Compute Engine instances, using CI/CD scripts to adjust DNS record weights and drain instances.
Deploy an iptables redirection sidecar script on all Compute Engine VMs, executing CI/CD remote SSH commands during deployment to locally route 5% of incoming traffic to a newly deployed canary container port.
Configure a Managed Instance Group rolling update with proactive updates, setting maxSurge to 5% and maxUnavailable to 0%, letting the instance group manager handle automated instance replacement and health check validation.