Load Balancing
In one sentence
What it is
A load balancer accepts client traffic and distributes it across a set of backend servers, removing unhealthy ones automatically. It gives you a single stable address in front of a changing pool of instances.
The externally-facing HTTP load balancers are implemented at the edge of Google's network rather than as a machine you run. A user connects to the nearest edge location and their request travels the rest of the way over the provider's private backbone, which is why a single global address can serve users worldwide with good latency.
Why it matters
Load balancing is where availability, latency and scaling all become concrete. It is also the topic most likely to appear as a selection question, because there are several products that look similar and only one is correct for a given scenario.
Being able to eliminate three of four options in a few seconds is worth more preparation time than almost any other networking topic, particularly on the Network Engineer and Architect exams.
The four questions that decide it
- 1Is the traffic coming from the internet or from inside your network? External or internal.
- 2Do users need one address worldwide, or is one region enough? Global or regional.
- 3Is it HTTP(S), or another protocol such as raw TCP or UDP? Application layer or network layer.
- 4Does the load balancer need to terminate and inspect the connection, or pass it through unchanged? Proxy or pass-through.
Answer those four and the correct product is almost always determined. Most scenarios state at least two of them explicitly and imply a third.
The main options
| Type | Use it when | Notable capability |
|---|---|---|
| Global external Application Load Balancer | Public websites and APIs served to users worldwide over HTTP(S). | One anycast address globally, content-based routing, edge caching, integrates with web application firewall policies. |
| Regional external Application Load Balancer | Public HTTP(S) traffic that must stay within one region, often for data residency. | Regional scope, useful where a global footprint is not permitted. |
| Internal Application Load Balancer | HTTP traffic between services inside your own network. | Private address, path and header based routing for internal microservices. |
| External proxy Network Load Balancer | Non-HTTP TCP traffic from the internet that should terminate at the edge. | TCP proxying with TLS termination for protocols that are not HTTP. |
| External pass-through Network Load Balancer | TCP or UDP traffic where the backend must see the original client address. | Preserves source addresses; regional; handles any protocol. |
| Internal pass-through Network Load Balancer | Internal TCP or UDP traffic, or as a next hop for network appliances. | Private, preserves addresses, commonly used in front of internal service tiers. |
Key concepts
- Backend service — defines the group of backends, the balancing mode, timeouts and the health check.
- Health check — probes backends and removes failing ones from rotation. A misconfigured health check that fails everything takes the whole service down, which is a common real-world outage.
- Backend group — usually a managed instance group or a network endpoint group, which is how serverless and container backends are attached.
- Forwarding rule — binds an IP address and port to the load balancer.
- URL map — routes requests to different backends by hostname and path, so one address can serve several services.
- Session affinity — sends a given client consistently to the same backend. Useful for stateful applications; it also undermines even distribution, so use it only when required.
- Capacity and balancing mode — controls when a backend is considered full and traffic should overflow to another region.
Common use cases
- A global web application on one anycast address with automatic failover between regions.
- One address serving several backend services routed by URL path.
- Internal load balancing in front of a service tier so callers use a stable private address.
- Gaming or telemetry servers over UDP where source addresses must be preserved.
- Blue/green and canary rollouts by weighting traffic between backend groups.
Certification relevance
Where this topic appears, and how deeply each exam goes into it. These are our own assessments based on published exam guides.
- Professional Cloud Network Engineer
The highest-yield topic on the exam. Expect several questions that are purely about selecting the correct type.
- Associate Cloud Engineer
Configuring a load balancer with a managed instance group backend and a working health check.
- Professional Cloud Architect
Appears in availability and global distribution design, and in cost discussions about egress.
- Professional Cloud DevOps Engineer
Traffic splitting for progressive rollouts and health checks as part of safe deployment.
Practice questions
Networking practice questions
9 original questions with full explanations.
Related Certifications
Related Cloud Topics
- Virtual Private Cloud (VPC)Your private network in the cloud: subnets, routes, firewall rules, peering and shared VPC.
- Content Delivery and Edge CachingServing content from locations close to users: cache keys, invalidation, and what should and should not be cached.
- Cloud DNSManaged name resolution: public and private zones, record types, forwarding and split-horizon design.
- Compute EngineVirtual machines with full control over the operating system: machine types, images, disks, instance groups and autoscaling.