Skip to content

Professional Cloud Network Engineer · Domain 3: Configuring managed network services · 16% of the exam

Task 3.1: Configuring load balancing.

Choosing a load balancer, backend services with NEGs and managed instance groups, balancing mode, session affinity, capacity, URL maps, health checks and global access, the GKE Gateway and Ingress controllers, and traffic management on Application Load Balancers.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A licensing service speaks a custom protocol over TCP. During a migration, half of its servers stay in the data center, reached over Cloud Interconnect, and half run on Compute Engine VMs in us-east4. Clients inside the VPC network must use one internal address in us-east4 that spreads connections across both groups of servers. Which load balancer meets this?

  1. AA regional internal proxy Network Load Balancer with a zonal NEG for the VMs and a hybrid connectivity NEG for the data center servers
  2. BAn internal passthrough Network Load Balancer with an instance group for the VMs and a hybrid connectivity NEG for the data center servers
  3. CA regional internal Application Load Balancer with a zonal NEG for the VMs and a hybrid connectivity NEG for the data center servers
  4. DAn internal passthrough Network Load Balancer whose failover backends are an unmanaged instance group holding the data center servers
Show the answer and why
  • AA regional internal proxy Network Load Balancer with a zonal NEG for the VMs and a hybrid connectivity NEG for the data center servers

    Correct

    The internal proxy Network Load Balancer handles TCP and opens its own connections to backends in Google Cloud or on premises, which a hybrid connectivity NEG represents.

  • BAn internal passthrough Network Load Balancer with an instance group for the VMs and a hybrid connectivity NEG for the data center servers

    Incorrect

    Its backends can only be instance groups or GCE_VM_IP zonal NEGs in the load balancer's region, so on-premises servers can't be backends.

  • CA regional internal Application Load Balancer with a zonal NEG for the VMs and a hybrid connectivity NEG for the data center servers

    Incorrect

    An Application Load Balancer proxies HTTP and HTTPS requests; the licensing protocol is not HTTP.

  • DAn internal passthrough Network Load Balancer whose failover backends are an unmanaged instance group holding the data center servers

    Incorrect

    Instance groups contain Compute Engine VMs only, and passthrough backends must be in the load balancer's region.

Two facts select the load balancer: the protocol is plain TCP, which rules out the HTTP proxies, and part of the backends are on premises, which rules out the passthrough load balancer, whose backends are VMs in its own region. The internal proxy Network Load Balancer terminates TCP at Envoy proxies and can send to on-premises endpoints through a hybrid connectivity NEG.

Question 2 · choose 1

An internal passthrough Network Load Balancer has failover enabled, with four primary VMs and two failover VMs. Its failover policy sets the failover ratio to 0.75 and turns on dropping traffic when backends are unhealthy. During an incident, two primary VMs pass their health checks, two fail them, and both failover VMs fail them. Where are new connections sent?

  1. ANowhere: they are dropped, because the healthy primary share of 0.5 is below the ratio and dropping traffic is turned on
  2. BTo all four primary VMs, healthy or not, because no failover backend is healthy
  3. CTo the two healthy primary VMs
  4. DTo the two failover VMs, because the healthy primary share of 0.5 is below the ratio of 0.75
Show the answer and why
  • ANowhere: they are dropped, because the healthy primary share of 0.5 is below the ratio and dropping traffic is turned on

    Incorrect

    Dropping applies only when no primary or failover backend is healthy; here two primary VMs are healthy.

  • BTo all four primary VMs, healthy or not, because no failover backend is healthy

    Incorrect

    Unhealthy primary backends become eligible only when no backend at all is healthy and dropping is turned off.

  • CTo the two healthy primary VMs

    Correct

    With no healthy failover backends, the eligible backends are all healthy primary backends, whatever the failover ratio.

  • DTo the two failover VMs, because the healthy primary share of 0.5 is below the ratio of 0.75

    Incorrect

    Failover backends are eligible only when they are healthy; with none healthy, the ratio doesn't send traffic to them.

The eligible backends of an internal passthrough Network Load Balancer with failover follow an order: if there are no healthy failover backends, they are all healthy primary backends; otherwise the failover ratio compares the share of healthy primaries with the configured value. Only when no primary or failover backend is healthy does the drop setting decide between dropping new connections and using the unhealthy primaries.

Question 3 · choose 1

A URL map has the default service web-default and one host rule for shop.example.com that uses path matcher shop-pm. shop-pm has the default service shop-default and three path rules: /images/* to img-bucket, /images/large/* to img-large, and /api to api-svc. Where is a request for https://shop.example.com/api/v2/orders sent?

  1. ATo api-svc, because /api is a prefix of the requested path
  2. BTo shop-default, the default service of the path matcher
  3. CTo web-default, the default service of the URL map
  4. DNowhere: the load balancer answers 404 because no path rule matches
Show the answer and why
  • ATo api-svc, because /api is a prefix of the requested path

    Incorrect

    A path rule without /* matches only that exact path; /api does not match /api/v2/orders.

  • BTo shop-default, the default service of the path matcher

    Correct

    The host rule matches, no path rule matches exactly or by a /* prefix, so the path matcher's default service handles the request.

  • CTo web-default, the default service of the URL map

    Incorrect

    The URL map's default service is used only when no host rule matches the hostname; shop.example.com has one.

  • DNowhere: the load balancer answers 404 because no path rule matches

    Incorrect

    When no path rule matches, the path matcher's default service receives the request.

For a hostname with a host rule, the path matcher is consulted: an exact path rule wins, then the /* rule with the longest matching prefix, and otherwise the path matcher's default service. Only hostnames without a host rule go to the URL map's default service. /images/large/a.png would go to img-large, and a request to www.example.com would go to web-default.

Google Cloud documentation

Question 4 · choose 1

A GKE cluster in us-east1 must expose an HTTP API to internal clients in the VPC network only. The team deploys a Gateway with gatewayClassName gke-l7-rilb, but it never gets an address. The VPC network's only proxy-only subnet in us-east1 has the purpose GLOBAL_MANAGED_PROXY and serves an existing cross-region internal Application Load Balancer. What should the network engineer do?

  1. AChange the Gateway's gatewayClassName to gke-l7-global-external-managed
  2. BExpand the existing GLOBAL_MANAGED_PROXY subnet so that it has room for the new load balancer's proxies
  3. CCreate a proxy-only subnet with the purpose REGIONAL_MANAGED_PROXY in us-east1 of the same VPC network
  4. DReserve the Gateway's internal address from the proxy-only subnet and reference it in the Gateway's spec
Show the answer and why
  • AChange the Gateway's gatewayClassName to gke-l7-global-external-managed

    Incorrect

    That class builds a global external Application Load Balancer, which would expose the API outside the VPC network.

  • BExpand the existing GLOBAL_MANAGED_PROXY subnet so that it has room for the new load balancer's proxies

    Incorrect

    A GLOBAL_MANAGED_PROXY subnet powers only the cross-region internal load balancers; size isn't the problem.

  • CCreate a proxy-only subnet with the purpose REGIONAL_MANAGED_PROXY in us-east1 of the same VPC network

    Correct

    gke-l7-rilb builds a regional internal Application Load Balancer, whose Envoy proxies need a REGIONAL_MANAGED_PROXY subnet in the region.

  • DReserve the Gateway's internal address from the proxy-only subnet and reference it in the Gateway's spec

    Incorrect

    A load balancer's forwarding rule address never comes from the proxy-only subnet, which can't be used for any other purpose.

The gke-l7-rilb GatewayClass is built on the regional internal Application Load Balancer. Envoy-based load balancers need a proxy-only subnet in each region where they run, and the purpose decides which ones it serves: REGIONAL_MANAGED_PROXY for the regional Envoy-based load balancers, GLOBAL_MANAGED_PROXY for the cross-region internal ones. One active subnet of each purpose can exist per network and region.

Question 5 · choose 1

A team places an internal passthrough Network Load Balancer in front of VMs that serve a TLS-encrypted TCP protocol. Where is the TLS connection terminated?

  1. AOn the backend VMs, because the load balancer passes connections through
  2. BOn the load balancer's forwarding rule, using a certificate attached to it
  3. COn Envoy proxies in the region's proxy-only subnet
  4. DOn the load balancer's backend service, after the health check passes
Show the answer and why
  • AOn the backend VMs, because the load balancer passes connections through

    Correct

    The internal passthrough Network Load Balancer can't terminate SSL traffic; the backends terminate it.

  • BOn the load balancer's forwarding rule, using a certificate attached to it

    Incorrect

    This load balancer doesn't proxy connections or hold certificates.

  • COn Envoy proxies in the region's proxy-only subnet

    Incorrect

    Proxy-only subnets serve Envoy-based load balancers; the passthrough load balancer has no proxies.

  • DOn the load balancer's backend service, after the health check passes

    Incorrect

    A passthrough backend service forwards packets unproxied; it never terminates TLS.

An internal passthrough Network Load Balancer routes connections directly from clients to backends without a proxy, and responses use direct server return. It can't terminate SSL traffic, so TLS ends on the backend VMs.

Question 6 · choose 1

Backends of a global external Application Load Balancer handle report requests that each take 10 to 30 seconds to complete. The team wants the load balancer to measure each backend's capacity in a way that suits such long-running requests. Which balancing mode fits?

  1. ARATE, based on new HTTP requests per second
  2. BCONNECTION, based on new TCP connections
  3. CIN-FLIGHT, based on the number of in-flight HTTP requests
  4. DUTILIZATION, combined with RATE on the same instance group
Show the answer and why
  • ARATE, based on new HTTP requests per second

    Incorrect

    The documentation recommends another mode instead of RATE when requests take more than a second to complete.

  • BCONNECTION, based on new TCP connections

    Incorrect

    Counting new connections doesn't reflect how many slow requests a backend is still serving.

  • CIN-FLIGHT, based on the number of in-flight HTTP requests

    Correct

    IN-FLIGHT measures capacity by in-flight requests and is meant for requests that take more than a second.

  • DUTILIZATION, combined with RATE on the same instance group

    Incorrect

    UTILIZATION can't be combined with other balancing modes on an instance group.

The balancing mode is the unit in which a backend's capacity is defined: CONNECTION, RATE, IN-FLIGHT, UTILIZATION or CUSTOM_METRICS. IN-FLIGHT counts in-flight HTTP requests and is recommended over RATE when requests take more than a second to complete; Application Load Balancers other than the classic one offer it for backends with the LONG traffic duration setting.

Question 7 · choose 1

A team uses the GKE Gateway controller and needs a Gateway that creates a regional external Application Load Balancer for its HTTP routes. Which gatewayClassName should the Gateway use?

  1. Agke-l7-rilb
  2. Bgke-l7-regional-external-managed
  3. Cgke-l7-gxlb
  4. Dgke-l7-cross-regional-internal-managed-mc
Show the answer and why
  • Agke-l7-rilb

    Incorrect

    This class builds internal Application Load Balancers, reachable only from inside the VPC network.

  • Bgke-l7-regional-external-managed

    Correct

    This class is built on the regional external Application Load Balancer and the regional external proxy Network Load Balancer.

  • Cgke-l7-gxlb

    Incorrect

    This class builds a global external load balancer on the classic Application Load Balancer.

  • Dgke-l7-cross-regional-internal-managed-mc

    Incorrect

    This multi-cluster class builds cross-region internal load balancers.

Each GatewayClass of the GKE Gateway controller maps to a load balancer type: gke-l7-regional-external-managed to regional external load balancers, gke-l7-rilb to internal ones, gke-l7-gxlb to the classic Application Load Balancer, and the -mc classes to multi-cluster deployments.

Google Cloud documentation

Practice domain 3 →Practice all domains →