Prepare and test your skills

Prepare and test your skills

Distinguish Between Global and Regional Load Balancing is the choice between placing backends in many regions or in one region. Cloud Load Balancing (opens in a new tab) places resources behind a single IP address that can be external for internet clients or internal to a Virtual Private Cloud (VPC) network. Choose global load balancing when users are spread across the world and need low latency and failover between regions, and choose regional load balancing when traffic and backends are localized in one region.
Global load balancing serves applications whose clients arrive from different parts of the world. Backends are created in the region closest to where traffic arrives at the Google frontend, and in many cases backends run in multiple regions (opens in a new tab) to minimize latency to clients in different locations. The closer users or client applications are to the load balancer backends, the lower the network latency between them, so multi-region placement delivers more consistent performance.
The cross-region internal Application Load Balancer is a proxy-based Layer 7 load balancer based on Envoy proxy that balances traffic to globally distributed backend services. Traffic flows from the forwarding rule to the closest backend relative to the forwarding rule, and Virtual IP addresses (VIPs) are allocated from a subnet in a specific region. VIPs from multiple regions can share the same global backend service, so if one region's backends are down, traffic can fail over to another region for high availability.
Regional load balancing keeps all backends in one Google Cloud region for applications with localized traffic. The regional internal Application Load Balancer is also an Envoy-based Layer 7 load balancer, but it requires that backends be in a single region. After the load balancer is configured, it automatically allocates Envoy proxies to meet traffic needs and applies rich traffic control based on HTTP or HTTPS parameters.
The regional external Application Load Balancer follows the same localized backend pattern for internet-facing HTTP and HTTPS traffic. For the regional internal mode, clients can be limited to that same region or can be in any region, based on whether global access is disabled or enabled on the forwarding rule. Choose regional load balancing when compliance, data locality, or application design keeps workloads in one place and cross-region failover is not required.
Protocol support determines which HTTP versions the forwarding path can use and how much latency and setup cost each choice adds. For the global external Application Load Balancer and the classic Application Load Balancer, HTTP/3 built on top of IETF QUIC is recommended. HTTP/3 is enabled by default in all major browsers, Android Cronet, and iOS, and clients that do not support it are not impacted, but UDP traffic must not be blocked or rate-limited and HTTP/3 must not have been disabled on the load balancers.
For the regional external Application Load Balancer, the supported forwarding protocols are HTTP/1.1, HTTPS, and HTTP/2. Both HTTPS and HTTP/2 require upfront overhead to set up Transport Layer Security (TLS). The backend service protocol between the load balancer and the backend instance also matters: using HTTP/2 can require significantly more Transmission Control Protocol (TCP) connections to the instance than HTTP or HTTPS, connection pooling is not available with HTTP/2, and more frequent backend connections can increase backend latency. Turning on Cloud CDN and caching as part of a default global external Application Load Balancer configuration can further reduce latency by serving cacheable responses closer to clients.
Choosing Between Cross-Region and Regional Internal Modes means matching backend scope, client reach, and failover needs to the correct internal Application Load Balancer. The two modes share Envoy-based Layer 7 routing but differ in where backends can live and how availability is preserved. Use the cross-region mode for internal clients in multiple regions, and use the regional mode when backends must remain in one region.
| Mode | Backends | Client access | High availability |
|---|---|---|---|
| Cross-region internal Application Load Balancer | Globally distributed backend services, traffic directed to closest backend relative to forwarding rule | VIP allocated from a subnet in a specific region, VIPs from multiple regions can share same global backend service | Traffic fails over to another region if one region's backends are down |
| Regional internal Application Load Balancer | Backends must be in a single Google Cloud region | Clients limited to that region or in any region, based on global access setting on forwarding rule | Envoy proxies auto-allocated to meet traffic needs within the region |
Exam tip: Choose HTTP/3 for global external Application Load Balancer forwarding rules, and HTTP/1.1, HTTPS, or HTTP/2 for regional external Application Load Balancer forwarding rules.
Evaluate Traffic Types and Proxy Mechanisms means matching client traffic to the Open Systems Interconnection (OSI) layer where the load balancer operates. Application Load Balancer (HTTP/HTTPS) (opens in a new tab) works at Layer 7 and understands HTTP requests, while Layer 4 proxy and passthrough services handle raw TCP and User Datagram Protocol (UDP) connections without reading HTTP content. This layer choice controls whether traffic can be routed by URL content or only by IP address, port, and connection information.
Layer 7 HTTP(S) proxy load balancing terminates client HTTP and HTTPS connections and makes routing decisions from request content. The proxy examines the host name and request path, so one global or regional frontend can send different URLs to different backend services. Choose this load balancer when requests need content-based routing, HTTPS offload with Secure Sockets Layer (SSL) certificates, HTTP to HTTPS redirects, or integration with serverless backends such as Cloud Run through a serverless network endpoint group (NEG).
The Layer 7 proxy uses a URL map to implement content-based routing with host rules and path matchers. A host rule directs requests to different services based on the host name, such as example.com versus another domain, and a path matcher directs requests based on the request path, such as /images versus /api. A simple configuration can keep the default host and path so all requests go to one backend service, while a multi-service setup adds rules to split traffic across backends.
Layer 4 TCP and UDP proxy handling distributes traffic based on connection properties such as source and destination IP address and port, without parsing HTTP URLs or headers. A proxy service (opens in a new tab) terminates the client TCP connection at a target TCP proxy and opens a new connection toward the backend, while a passthrough service delivers packets directly to backends and preserves client connection information. Choose Layer 4 handling when the workload is non-HTTP traffic, encrypted TCP that must not be decrypted at the load balancer, or any protocol where only IP and port decisions are needed.
Layer 4 backends can use session affinity to keep a client on the same backend virtual machine (VM). With client IP affinity, the load balancer creates a hash from the client IP address and the load balancer IP address from the internal forwarding rule and directs that client's requests to the same backend VM. This behavior matters for stateful TCP services that cannot share session state across backends.
How Frontend, Proxy, and Backend Components Connect is the ordered chain that moves traffic from the frontend address to the backend service. The chain separates public connection handling, routing logic, and backend selection so each part can be configured independently:
A left-to-right process flow showing client traffic moving through forwarding rule, target proxy, URL map, backend service with health check, to NEG backends.
us-central1.The frontend for an external Application Load Balancer typically uses Premium Network Service Tier, IPv4, port 80 for HTTP, and port 443 for HTTPS with an SSL certificate. Google-managed certificates are recommended because Google Cloud obtains, manages, and renews them automatically, but they require ownership of a domain, while a self-signed or self-managed certificate can be used for testing. Enabling HTTP to HTTPS redirect creates an additional partial HTTP load balancer that uses the same IP address and redirects HTTP requests to the HTTPS frontend, and this option requires HTTPS protocol plus a reserved IP address. The following comparison summarizes when to choose each traffic path:
| Traffic type | OSI layer | Routing basis | Choose when |
|---|---|---|---|
| Application Load Balancer (HTTP/HTTPS) | Layer 7 | Host name, request path, URL map rules | Traffic is HTTP/HTTPS and needs content-based routing, TLS termination, or serverless backends |
| Proxy Network Load Balancer for TCP | Layer 4 | IP address, port, session affinity | Traffic is TCP/UDP, TLS should stay encrypted to the backend, or HTTP inspection is not needed |
Regional Envoy-based load balancers depend on a proxy-only subnet in the Virtual Private Cloud (VPC) network. The proxy-only subnet has purpose Regional Managed Proxy, is active in the load balancer region, and commonly uses a range such as 10.129.0.0/23 alongside the main subnet such as 10.1.2.0/24. Traffic flowing from the load balancer to serverless NEG backends uses special routes defined outside the VPC that are not subject to firewall rules, so a load balancer with only serverless NEG backends does not need firewall rules from the proxy-only subnet to the backend.
Exam tip: Choose Application Load Balancer when routing depends on host or path in the URL; choose Layer 4 TCP/UDP handling when routing depends only on IP address and port.
Configure Backend Services and Health Monitoring controls where a Google Cloud load balancer sends traffic so that only responsive backends receive requests. A backend service (opens in a new tab) groups one or more backends, such as instance groups, and links them to a health check and a routing rule. A frontend configuration provides the public entry point for that traffic through a stable IP address, forwarding rules, proxies, and SSL certificates.
Backend Services and Instance Groups define which backends receive traffic and how traffic is distributed to them. Traffic flows from the URL map to the backend service, and then from the backend service to each attached backend, such as managed instance groups in different zones. The backend service also stores settings such as the protocol from the load balancer to the backends, for example HTTP, and whether the service is global or regional.
A typical backend setup follows this order:
Because the backend service depends on both the instance groups and the health check, removing an unhealthy group or adding capacity in another zone changes where new requests are sent without changing the frontend address.
Load-balancing health checks are probes that test whether application software on each backend is actually responsive. A Compute Engine virtual machine (VM) can remain in the RUNNING state while the application on it has crashed, so autoscaling alone cannot guarantee that sufficient capacity means usable capacity. The health check solves this by continuously checking responsiveness and telling the load balancer to route application traffic to only the backends that answer correctly.
The health check is attached when the backend service is created, for example with --http-health-checks=basic-check, so the backend service depends on the health check for its routing decisions. When a backend stops responding, the load balancer stops sending it new traffic, which improves reliability and prevents individual healthy resources from becoming overloaded. This same principle applies whether the backends are zonal instance groups, internet network endpoint groups (NEGs), or serverless NEGs for Cloud Run, Cloud Run functions, and App Engine.
Frontend Configuration for IP Addresses and SSL Certificates is the entry point that clients reach, and it manages the IP address, ports, and encryption for incoming connections. Traffic flows from clients to a global forwarding rule, then from the forwarding rule to a target proxy, then from the target proxy to the URL map. Each forwarding rule matches on IP address, IP protocol, and port, so separate HTTP and HTTPS forwarding rules can share one reserved global static IP address but send traffic to different target proxies.
The target proxy holds the SSL certificate for HTTPS load balancing and handles encryption and decryption before routing requests to the URL map. Certificate options include:
HTTP and HTTPS frontends share most settings but differ in protocol, port, and certificate handling:
| Frontend | Protocol | Port | Certificate requirement |
|---|---|---|---|
| HTTP frontend | HTTP | 80 | No certificate required |
| HTTPS frontend | HTTPS | 443 | Requires a certificate map or classic Compute Engine SSL certificate |
Both frontends commonly use Network Service Tier Premium, IPv4, a reserved static IP address, and an HTTP keepalive timeout of 5 to 1200 seconds with a default of 610 seconds. Enabling HTTP to HTTPS redirect creates an additional partial HTTP load balancer that uses the same IP address as the HTTPS frontend and redirects HTTP requests to HTTPS, and this option can only be selected when the protocol is HTTPS and a reserved IP address is used.
Exam tip: A VM in the RUNNING state is not automatically healthy — the load balancer sends traffic only to backends that pass the attached health check.
Choose global load balancing in Cloud Load Balancing when users are spread across the world and need low latency and failover between regions, and choose regional load balancing when traffic and backends are localized in one region. Cloud Load Balancing places resources behind a single IP address that can be external for internet clients or internal to a Virtual Private Cloud (VPC) network.
Both are proxy-based Layer 7 load balancers based on Envoy proxy, but the cross-region internal Application Load Balancer balances traffic to globally distributed backend services and directs traffic to the closest backend relative to the forwarding rule, while the regional internal Application Load Balancer requires that backends be in a single region. If one region's backends are down, the cross-region mode can fail over traffic to another region for high availability, whereas the regional mode automatically allocates Envoy proxies to meet traffic needs within the region.
Use the Application Load Balancer (HTTP/HTTPS), which works at Layer 7, when requests need content-based routing by host name and request path through a URL map, HTTPS offload with Secure Sockets Layer (SSL) certificates, HTTP to HTTPS redirects, or integration with serverless backends such as Cloud Run through a serverless network endpoint group (NEG). Choose Layer 4 TCP and UDP proxy handling when the workload is non-HTTP traffic, encrypted TCP that must not be decrypted at the load balancer, or any protocol where only IP address and port decisions are needed.
A Compute Engine virtual machine (VM) can remain in the RUNNING state while the application on it has crashed, so health checks continuously probe whether application software on each backend is actually responsive. The load balancer sends application traffic only to the backends that answer correctly and stops sending new traffic to a backend that stops responding.
A company is deploying an e-commerce web application across multiple Google Cloud regions, including us-central1 and europe-west1, to serve customers worldwide with minimal latency. The application serves standard HTTP and HTTPS web traffic, and the architecture requires a single external IP address that automatically routes incoming traffic to the nearest healthy backend instance group.
Which Google Cloud load balancing solution should the company implement?
Last updated