Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You manage a Global External Application Load Balancer routing traffic to two backend services (web-backend-svc and api-backend-svc) that share a single regional managed instance group (MIG), app-mig-us-central1:
web-backend-svc has a connection draining timeout of 120 seconds, while api-backend-svc has connection draining disabled (0 seconds).CLIENT_IP session affinity.app-mig-us-central1 where in-flight requests can take up to 240 seconds to complete.Which configuration and operational behavior should you apply and expect?
web-backend-svc with --global --connection-draining-timeout=300, detach app-mig-us-central1 from api-backend-svc, and lower the health check unhealthy threshold so instances fail probes immediately during the update. Detaching the MIG triggers the 300-second draining timer inherited from web-backend-svc while aggressive health checks prevent HTTP 502 errors on active sessions.Detaching an instance group from a backend service removes the entire backend group from the load balancer's backend configuration, while lowering a health check unhealthy threshold reduces the number of consecutive failed probes required before an instance is marked UNHEALTHY.
app-mig-us-central1 from api-backend-svc drops API traffic immediately instead of draining it for 300 seconds.api-backend-svc only inherits the larger 300-second draining delay for MIG instance deletions while app-mig-us-central1 remains attached and undergoing instance-level removal; detaching the group entirely disrupts api-backend-svc routing.503 errors), health checks do not prevent HTTP 502 errors caused by prematurely terminating existing in-flight connections.resize(), deleteInstances(), recreateInstances(), abandonInstances(), autoscaling, or MIG Updater operations).api-backend-svc leaves the service with no eligible backends, returning HTTP 503 errors (failed_to_pick_backend).This approach would never gracefully drain api-backend-svc by detaching the MIG; instead, app-mig-us-central1 must remain attached to both backend services with --connection-draining-timeout=300 configured on api-backend-svc before running the MIG rolling update.
serviceLbPolicies resource with autoCapacityDrain enabled to api-backend-svc and leave --connection-draining-timeout=0. When the MIG Updater replaces VMs, autoCapacityDrain automatically drains individual instances for up to 300 seconds when their health checks fail while preserving CLIENT_IP session affinity across the MIG.Auto-capacity draining (autoCapacityDrain), configured inside a serviceLbPolicies resource, combines health checks and backend capacity to automatically set the effective capacity of an entire backend instance group or NEG to zero when most of its endpoints become unhealthy.
autoCapacityDrain only triggers when fewer than 25% of instances or endpoints in a MIG or NEG pass health checks, and it will never drain 50% or more of the backend groups on a backend service. During a standard rolling update, most VMs remain healthy, so autoCapacityDrain never activates.--connection-draining-timeout=0 disables connection draining on api-backend-svc, meaning instances removed by the MIG Updater do not receive a 300-second window for existing connections unless another shared backend service enforces a larger timeout.CLIENT_IP session affinity.< 25% of its members pass health checks.>= 35% of its members pass health checks for at least 60 seconds.capacityScaler to 0 on the entire backend group.Enabling autoCapacityDrain would be appropriate if api-backend-svc spanned multiple regional MIGs and you wanted to automatically divert traffic away from a severely degraded region (< 25% healthy backends) without manual intervention.
capacityScaler to 0 on app-mig-us-central1 within api-backend-svc while leaving its connection draining timeout at 0, and configure --connection-draining-timeout=300 on web-backend-svc. Setting capacityScaler to 0 drains individual VM connections gracefully for api-backend-svc while allowing web-backend-svc to enforce an independent 300-second termination delay.The capacityScaler parameter (0.0 to 1.0) on a backend service's backend entry scales the target serving capacity (such as max rate or utilization) of an entire backend instance group or NEG within the load balancer's traffic distribution algorithm.
capacityScaler to 0 directs new traffic away from the entire instance group (useful for draining a whole region or shifting load to another healthy MIG), rather than enabling per-instance connection draining during a MIG rolling update.app-mig-us-central1 is the only backend group for api-backend-svc, setting its capacityScaler to 0 removes all serving capacity for the API, causing load balancing errors if no alternate healthy MIG exists.api-backend-svc set to 0 seconds, Google Cloud enforces the largest draining timeout (300 seconds from web-backend-svc) before deleting any VM in the shared MIG, so VMs cannot terminate immediately for api-backend-svc alone.--connection-draining-timeout set above 0, removed instances have existing connections terminated as quickly as possible when deleted.Setting capacityScaler to 0 would be appropriate if api-backend-svc had multiple regional MIGs and you needed to shift all traffic away from app-mig-us-central1 to another region prior to maintenance, rather than performing an in-place MIG rolling update.
api-backend-svc with --global --connection-draining-timeout=300 before starting the MIG rolling update. Google Cloud applies the largest timeout (300 seconds) across both shared backend services, halting new connections to draining VMs while allowing up to 300 seconds (plus up to 60 seconds before termination) for active requests to finish, though pooled connections may still deliver requests to draining VMs and CLIENT_IP session affinity can break as instance counts change.Connection draining is a backend service feature that gives in-progress requests time to complete when a VM instance is removed from an instance group or replaced by the Managed Instance Group (MIG) Updater. It is configured per backend service using --connection-draining-timeout (from 0 to 3600 seconds, where 0 disables draining).
api-backend-svc with --global --connection-draining-timeout=300 provides a buffer above the 240-second maximum request duration so in-flight API calls finish before VM deletion.300 seconds rather than 120 seconds). Instance deletion in app-mig-us-central1 is delayed by at least 300 seconds, plus up to 60 additional seconds before termination.CLIENT_IP session affinity requires the total number of configured and healthy instances to remain constant. Removing or replacing VMs during a rolling update alters the backend pool size and can break session affinity for affected clients.Setting --connection-draining-timeout=300 directly on api-backend-svc satisfies the 240-second request SLA across both shared backend services without detaching the MIG or disrupting traffic to healthy instances.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated