← Back to posts

GCP ACE: Every Google Cloud Load Balancer, Explained

Google Cloud has one load balancing service with a lot of variants. The names are what trips people up: “Network Load Balancer” can mean a proxy or a passthrough, “HTTP(S) Load Balancer” is now called Application Load Balancer, and “classic” is a mode, not a product. This post lays out the full lineup, what separates each variant, and how to choose. It maps to the load balancing options in the planning section of the ACE exam guide.

The two questions that explain everything

Before looking at any product name, there is one distinction that explains most of the differences: does the load balancer terminate the client connection or not?

Passthrough load balancers do not terminate anything. Packets reach the backend VM with the original source and destination IP, protocol and ports unchanged. The TCP connection is terminated on the backend VM itself, and responses go straight back to the client without passing through the load balancer (direct server return, DSR). The client’s real IP is visible to the VM natively.

Proxy load balancers terminate the client connection and open a new one to the backend. Google runs the proxy for you, on Google Front Ends (GFEs) or on Envoy. The backend sees the proxy’s address, not the client’s. To recover the client IP you rely on the X-Forwarded-For header (Application Load Balancers) or the PROXY protocol (proxy Network Load Balancers).

Everything else follows from this:

One more practical note from Google’s docs: if your authentication logic assumes that the same source IP opens successive connections, a proxy load balancer can break it, because backend connections come from different proxy IPs. For Application Load Balancers, Google recommends Identity-Aware Proxy (IAP) instead of IP-based auth.

The families

Google splits the portfolio into two types, and the second one splits again:

Two older names you will still see in the console and in exam questions: the HTTP(S) load balancer is now the Application Load Balancer, and the TCP Proxy and SSL Proxy load balancers are now grouped under proxy Network Load Balancers.

Google Cloud decision tree for choosing a load balancer

Choose a load balancer. Source: Google Cloud documentation, licensed under CC BY 4.0.

All 13 deployment modes

Each family comes in several modes, defined by external vs internal and global vs regional. The load-balancing scheme is the attribute you set on the forwarding rule and backend service in gcloud.

FamilyModeTrafficNetwork tierScheme
ApplicationGlobal externalHTTP/HTTPSPremiumEXTERNAL_MANAGED
ApplicationRegional externalHTTP/HTTPSPremium or StandardEXTERNAL_MANAGED
ApplicationClassicHTTP/HTTPSGlobal in Premium, regional in StandardEXTERNAL
ApplicationRegional internalHTTP/HTTPSPremiumINTERNAL_MANAGED
ApplicationCross-region internalHTTP/HTTPSPremiumINTERNAL_MANAGED
Proxy NetworkGlobal externalTCP, optional SSL offloadPremiumEXTERNAL_MANAGED
Proxy NetworkRegional externalTCPPremium or StandardEXTERNAL_MANAGED
Proxy NetworkClassicTCP, optional SSL offloadGlobal in Premium, regional in StandardEXTERNAL
Proxy NetworkRegional internalTCP, no SSL offloadPremiumINTERNAL_MANAGED
Proxy NetworkCross-region internalTCP, no SSL offloadPremiumINTERNAL_MANAGED
Passthrough NetworkGlobal external (Preview)TCP, UDP, ESP, GRE, ICMP, ICMPv6PremiumEXTERNAL_PASSTHROUGH
Passthrough NetworkRegional externalTCP, UDP, ESP, GRE, ICMP, ICMPv6Premium or StandardEXTERNAL
Passthrough NetworkInternal (always regional)TCP, UDP, ICMP, ICMPv6, SCTP, ESP, AH, GREPremiumINTERNAL

Notes that matter:

What each one runs on

Load balancerTechnology
Global external Application, global external proxy NetworkEnvoy-based GFE
Classic Application, classic proxy NetworkGFE
Regional external and internal Application, cross-region internal ApplicationEnvoy
Regional external, regional internal and cross-region internal proxy NetworkEnvoy
Global and regional external passthrough NetworkMaglev
Internal passthrough NetworkAndromeda

Application Load Balancers

Layer 7, proxy-based, HTTP and HTTPS. This is the one to pick when you want to run and scale a web service behind a single address and route on URL, host or headers.

What you get:

The modes:

Proxy Network Load Balancers

Layer 4 reverse proxies for TCP traffic. They terminate the connection at the load balancer and forward it over a new TCP connection to the closest available backend.

Use it for non-HTTP TCP services that need global distribution or TLS offload at scale, for example a database proxy, a custom TCP protocol, or an SMTP service.

Passthrough Network Load Balancers

Layer 4 and not proxies. Built on Maglev (external) and Andromeda (internal).

Behavior to remember:

Target pools

A target pool is the original way of telling the regional external passthrough Network Load Balancer where to send traffic: a list of VM instances plus a legacy HTTP health check. Google keeps it for existing setups, and Quick Lab exercises still use it, but the docs recommend backend services for new deployments.

Limitations of target pool-based load balancers, from Google’s feature comparison:

Google provides a migration path from target pools to backend services. The backend service model is shared by almost every other load balancer type, which is why it is the one to learn.

# Legacy: target pool-based external passthrough load balancer
gcloud compute http-health-checks create basic-check

gcloud compute target-pools create www-pool \
  --region=europe-west1 \
  --http-health-check=basic-check

gcloud compute target-pools add-instances www-pool \
  --instances=www1,www2 \
  --instances-zone=europe-west1-b

gcloud compute forwarding-rules create www-rule \
  --region=europe-west1 \
  --ports=80 \
  --target-pool=www-pool

What a load balancer is made of

The load balancer is not a single resource. It is a chain, and the exam likes asking which piece does what.

Proxy-based (Application and proxy Network):

forwarding rule  ->  target proxy  ->  URL map (Application only)  ->  backend service  ->  backends + health check
(IP and port)        (terminates       (host/path rules)               (balancing mode,     (instance groups,
                      the connection)                                   affinity, protocol)   NEGs, buckets)

Passthrough has no target proxy and no URL map:

forwarding rule  ->  backend service  ->  backends + health check

A global external Application Load Balancer, built step by step:

# Reserve a global anycast IP
gcloud compute addresses create web-ip \
  --ip-version=IPV4 --network-tier=PREMIUM --global

# Health check and backend service
gcloud compute health-checks create http web-hc --port=80 --global

gcloud compute backend-services create web-be \
  --load-balancing-scheme=EXTERNAL_MANAGED \
  --protocol=HTTP \
  --health-checks=web-hc \
  --global

gcloud compute backend-services add-backend web-be \
  --instance-group=web-mig \
  --instance-group-zone=europe-west1-b \
  --global

# URL map, target proxy, forwarding rule
gcloud compute url-maps create web-map --default-service=web-be

gcloud compute target-http-proxies create web-proxy --url-map=web-map

gcloud compute forwarding-rules create web-fr \
  --load-balancing-scheme=EXTERNAL_MANAGED \
  --network-tier=PREMIUM \
  --address=web-ip \
  --target-http-proxy=web-proxy \
  --ports=80 \
  --global

A regional external passthrough Network Load Balancer with a backend service:

gcloud compute health-checks create tcp nlb-hc \
  --region=europe-west1 --port=80

gcloud compute backend-services create nlb-be \
  --load-balancing-scheme=EXTERNAL \
  --protocol=TCP \
  --region=europe-west1 \
  --health-checks=nlb-hc \
  --health-checks-region=europe-west1

gcloud compute backend-services add-backend nlb-be \
  --instance-group=web-mig \
  --instance-group-zone=europe-west1-b \
  --region=europe-west1

gcloud compute forwarding-rules create nlb-fr \
  --load-balancing-scheme=EXTERNAL \
  --region=europe-west1 \
  --ip-protocol=TCP \
  --ports=80 \
  --backend-service=nlb-be \
  --backend-service-region=europe-west1

An internal passthrough Network Load Balancer uses --load-balancing-scheme=INTERNAL and the forwarding rule also needs --network and --subnet.

Proxy-only subnets

Every Envoy-based load balancer needs a proxy-only subnet in its region and VPC network: the regional external and internal Application Load Balancers, the regional external and internal proxy Network Load Balancers, and the cross-region internal variants. Traffic from the proxies to your backends uses source IPs from this subnet.

gcloud compute networks subnets create proxy-only-ew1 \
  --purpose=REGIONAL_MANAGED_PROXY \
  --role=ACTIVE \
  --region=europe-west1 \
  --network=my-vpc \
  --range=10.129.0.0/23

The classic and global external modes run on GFEs and do not use a proxy-only subnet.

Firewall rules

Load balancers do not work until you allow the right ingress traffic to the backends. The ranges below come from Google’s current firewall documentation and are different from some older guides, so check the page for your exact load balancer before relying on memory.

Load balancerAllow ingress from
Global external Application, global external proxy NetworkHealth checks 35.191.0.0/16. GFE proxies (instance group, zonal NEG, hybrid NEG backends): 35.191.0.0/16 and 130.211.0.0/22
Classic Application, classic proxy NetworkSame GFE ranges
Regional and cross-region Application, regional and cross-region proxy NetworkHealth checks 35.191.0.0/16, plus the proxy-only subnet range
Regional external passthrough NetworkHealth checks 35.191.0.0/16 and 209.85.204.0/22 (plus 209.85.152.0/22 for target pools), and the client IP ranges (for example 0.0.0.0/0)
Internal passthrough NetworkHealth checks 35.191.0.0/16, plus the internal client IP ranges
Global external passthrough Network (Preview)Health checks 136.124.104.0/22 and 136.124.108.0/22, plus client IP ranges

Two rules of thumb: GFE-based load balancers need the Google ranges, Envoy-based ones need the proxy-only subnet, and passthrough load balancers also need the actual client source ranges, because the packets keep their original source IP.

Choosing one

Work through it in this order:

  1. Traffic type. HTTP/HTTPS means Application. TCP with TLS offload or proxy features means proxy Network. UDP, ESP, GRE, ICMP, or “preserve client IP” means passthrough.
  2. External or internal. Internet clients versus clients inside the VPC or connected networks.
  3. Global or regional. Backends in several regions or one anycast address means global (or cross-region for internal). One region, regulatory control over where TLS terminates, or IPv4-only means regional.
  4. Network tier. Premium uses Google’s backbone and is the default. Standard uses ISP networks and is cheaper. The global external Application and global external proxy Network load balancers are Premium only. Internal load balancers are always Premium.
  5. Proxy or passthrough, if both are options.
ScenarioPick
Public website or API, users worldwide, one IPGlobal external Application
Same, but data and TLS termination must stay in one regionRegional external Application
Path-based routing between microservices, internal onlyRegional internal Application
Game server or VoIP over UDPRegional external passthrough Network
Need real client IPs in VM logs for auditingPassthrough Network
Non-HTTP TCP service, global, TLS offloadGlobal external proxy Network
Internal TCP service behind an internal IPInternal passthrough Network (or regional internal proxy Network if you need proxy features)
Third-party firewall appliance in the traffic pathInternal passthrough Network used as a next hop
Cloud Run or Cloud Storage as a backendApplication Load Balancer (serverless NEG or backend bucket)
Backends on-premises or in another cloudApplication or proxy Network with hybrid or internet NEGs

Resilience depends on scope and on your backends. Global and cross-region load balancers survive a regional outage if you have healthy backends elsewhere. A regional load balancer spans the zones of its region, so a zonal outage is covered but a regional outage takes it down.

Exam-relevant takeaways

Source

↗ Google Cloud: Cloud Load Balancing overview ↗ Google Cloud: Choose a load balancer ↗ Google Cloud: Load balancer feature comparison ↗ Google Cloud: Firewall rules for load balancers ↗ Google Cloud: Proxy-only subnets for Envoy-based load balancers

Luciano — Personal Tech Blog Built with curiosity and too many open tabs.

↗ LinkedIn