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.
Your organization runs a stateful web application behind a Global external Application Load Balancer (Premium Tier) backed by zonal Managed Instance Groups (MIGs) in us-central1 and europe-west1. The backend service uses GENERATED_COOKIE session affinity, UTILIZATION balancing mode, and a 0-second connection draining timeout. Requests complete in under 500 ms.
You need to resolve the following requirements:
GCE_VM_IP_PORT NEGs.europe-west1 from receiving new traffic during planned maintenance without failing health checks.Which configuration should you implement?
CONNECTION with max-connections-per-endpoint, attach a serviceLbPolicy with autoCapacityDrain enabled to drain europe-west1 during maintenance, and set a non-zero connection draining timeout (drainingTimeoutSec).CONNECTION balancing mode defines backend target capacity by the number of concurrent or new TCP connections (max-connections-per-endpoint or max-connections-per-instance).autoCapacityDrain (configured via a serviceLbPolicy resource) automatically sets a backend group's effective capacity to zero when fewer than 25% of its instances or endpoints pass health checks.RATE and UTILIZATION (and IN_FLIGHT for LONG traffic duration). CONNECTION balancing mode is designed for Proxy Network Load Balancers handling non-HTTP TCP or SSL protocols.autoCapacityDrain fails in a two-backend setup: Auto-capacity draining only drains a backend if the ratio of drainable backends to total backends is strictly less than 50%. With only two regional backends (us-central1 and europe-west1), draining one equals exactly 50%, preventing autoCapacityDrain from triggering.autoCapacityDrain depends on health check failures (<25% healthy) rather than cleanly excluding europe-west1 at the first-layer GFE before maintenance.CONNECTION balancing mode cannot be applied to Layer 7 HTTP/HTTPS/HTTP2 Application Load Balancer backend services.autoCapacityDrain requires at least three backend groups for one group to be drained (1/3 < 50%), and requires 35% healthy endpoints for 60 seconds to undrain.capacityScaler: 0 works with just two backends (as long as at least one backend remains active).You were configuring a Global external proxy Network Load Balancer (TCP/SSL proxy) across three or more backend groups and wanted automated health-check-driven draining rather than planned manual maintenance draining.
trafficDuration to LONG with the IN_FLIGHT balancing mode, change localityLbPolicy to RING_HASH with session affinity set to NONE, set a non-zero connection draining timeout (drainingTimeoutSec), and configure europe-west1 backends to fail health checks during maintenance.IN_FLIGHT balancing mode (with trafficDuration: LONG) measures capacity by concurrent in-progress HTTP requests rather than requests per second.RING_HASH locality policy performs consistent hashing across healthy endpoints within a zone, while NONE session affinity disables client cookie persistence.IN_FLIGHT is intended for long-running HTTP requests taking more than one second to complete. For sub-500 ms requests (SHORT duration), RATE balancing mode accurately tracks throughput and responsiveness.GENERATED_COOKIE by setting session affinity to NONE prevents the load balancer from pinning user sessions via HTTP cookies across requests and across regional boundaries. RING_HASH alone only controls intra-zone endpoint selection and does not preserve client-side cookie affinity.europe-west1 leaves first-layer GFEs routing traffic into europe-west1 second-layer GFEs, causing unnecessary spillover delays instead of immediately excluding the region via capacityScaler: 0.IN_FLIGHT requires explicitly setting trafficDuration to LONG on the backend-to-backend-service attachment.localityLbPolicy (RING_HASH, LEAST_REQUEST, ROUND_ROBIN) operates after a zone is selected and is not a substitute for Layer 7 cookie-based session affinity.The application served stateless, long-lived HTTP requests (>1 second) where client cookie persistence was unnecessary and consistent intra-zone hashing (RING_HASH) was desired.
RATE (using max-rate-per-instance for MIGs and max-rate-per-endpoint for zonal NEGs), set a non-zero connection draining timeout (drainingTimeoutSec) on the backend service, and set capacityScaler to 0 on the europe-west1 backend during maintenance.This configuration combines three complementary backend service controls in Google Cloud:
RATE balancing mode: Measures backend serving capacity by target requests per second (max-rate-per-instance for Managed Instance Groups and max-rate-per-endpoint for zonal GCE_VM_IP_PORT Network Endpoint Groups) rather than fluctuating VM CPU utilization.drainingTimeoutSec): Preserves active connections for a configurable timeout period when instances or NEG endpoints are stopped, deleted, abandoned, or scaled in.capacityScaler): A manual multiplier from 0.0 to 1.0 that scales a backend's target capacity without altering health check results.UTILIZATION, which causes erratic fullness shifts (especially below 10% average utilization) and is unsupported by NEGs, RATE balancing mode provides deterministic capacity tracking across both MIGs and zonal GCE_VM_IP_PORT NEGs, keeping GENERATED_COOKIE session affinity stable for short (<500 ms) HTTP requests.drainingTimeoutSec prevents the load balancer from immediately tearing down in-progress requests when VMs or container endpoints are removed by autoscaling or rolling updates.capacityScaler to 0 on europe-west1 (valid because us-central1 remains active) causes first-layer Google Front Ends (GFEs) to immediately exclude europe-west1 from routing decisions, avoiding health check failure delays and suboptimal second-layer GFE spillover.GCE_VM_IP_PORT).capacityScaler to 1.0 after maintenance.Other balancing modes either fail on NEGs (UTILIZATION), target non-HTTP proxy protocols (CONNECTION), or are designed for slow >1-second requests (IN_FLIGHT). Pairing RATE with connection draining and capacityScaler: 0 directly satisfies every operational and architectural constraint.
UTILIZATION balancing mode, change session affinity to STRONG_COOKIE_AFFINITY, set a non-zero connection draining timeout (drainingTimeoutSec), and set capacityScaler to 0 on the europe-west1 backend during maintenance.UTILIZATION balancing mode distributes traffic across VM instance groups based on approximated backend CPU utilization and other host metrics.STRONG_COOKIE_AFFINITY (stateful cookie-based session affinity) uses a load-balancer-managed cookie to bind client sessions more strictly to a specific backend, even when total backend counts change.GCE_VM_IP_PORT NEGs do not support the UTILIZATION balancing mode. Keeping UTILIZATION blocks the planned GKE container-native load balancing migration.UTILIZATION relies on fluctuating CPU metrics—and becomes highly sensitive to minor traffic variations when average utilization drops below 10%—backend fullness changes unpredictably. Google Cloud recommends using UTILIZATION only with session affinity set to NONE, and using RATE or CONNECTION whenever session affinity is enabled.UTILIZATION is restricted exclusively to instance group backends (zonal or regional MIGs and unmanaged instance groups).NONE session affinity and UTILIZATION trigger Load Balancer Analyzer warnings for broken session affinity.capacityScaler to 0 and enabling connection draining work as intended here, but the balancing mode invalidates both the persistence fix and the NEG roadmap.The architecture remained permanently on VM instance groups with NONE session affinity (stateless workloads), or if the balancing mode were simultaneously switched to RATE alongside STRONG_COOKIE_AFFINITY to also survive autoscaling count changes.
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