Google Cloud Tutorial · Networking · Lesson 17 of 27

Cloud Load Balancing

Choosing a Google Cloud load balancer: global and regional, application (HTTP) and network (TCP/UDP), external and internal, plus Cloud CDN and Cloud Armor.

Members can save this page, take notes and track progress. See membership · Sign in

The main options

Load balancer Traffic Scope Typical use
Global external Application LB HTTP(S), HTTP/2, gRPC global anycast IP public websites and APIs across regions
Regional external Application LB HTTP(S) one region regional data-residency needs
Internal Application LB HTTP(S) inside the VPC internal microservices
External/internal Network LB (passthrough or proxy) TCP/UDP regional (or global proxy) databases, games, non-HTTP protocols

The global external Application Load Balancer gives one IP address announced from Google's edge worldwide. Users connect to the nearest edge, and traffic goes to the closest healthy backend region.

Backends and extras

  • Backends: managed instance groups, network endpoint groups for GKE Pods (container-native load balancing), serverless NEGs for Cloud Run, or internet endpoints.
  • Cloud CDN caches responses at the edge; Cloud Armor adds WAF rules, rate limiting and DDoS protection.
  • Google-managed certificates handle TLS.
  • Health checks come from 35.191.0.0/16 and 130.211.0.0/22; allow them in firewall rules.
Picking a load balancer from requirementsTry it yourself
def choose(protocol, public, multi_region, need_waf=False):
    if protocol in ("http", "https", "grpc"):
        if public:
            lb = "global external Application LB" if multi_region else "regional external Application LB"
            return lb + (" + Cloud Armor" if need_waf else "")
        return "internal Application LB"
    return ("external" if public else "internal") + " passthrough Network LB"

cases = [("https", True, True, True), ("https", True, False, False), ("grpc", False, False, False),
         ("tcp", True, False, False), ("udp", False, False, False)]
for c in cases:
    print(f"{c[0]:5} public={c[1]!s:5} multi-region={c[2]!s:5} -> {choose(*c)}")

Output

https public=True  multi-region=True  -> global external Application LB + Cloud Armor
https public=True  multi-region=False -> regional external Application LB
grpc  public=False multi-region=False -> internal Application LB
tcp   public=True  multi-region=False -> external passthrough Network LB
udp   public=False multi-region=False -> internal passthrough Network LB

Test yourself

Which load balancer gives a public HTTPS API one IP address worldwide with failover between regions?

  1. An internal passthrough Network Load Balancer
  2. The global external Application Load Balancer
  3. Cloud NAT
  4. A regional internal Application Load Balancer
Show answer

Answer: The global external Application Load Balancer

It uses a global anycast IP and routes to the closest healthy backend.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake