This document provides an overview of the different load balancing solutions that are available in Google Cloud.
Cloud Load Balancing gives you the ability to distribute load-balanced compute resources in single or multiple regions, meet your high availability requirements, put your resources behind a single anycast IP, and scale your resources up or down with intelligent autoscaling. Cloud Load Balancing is integrated with Cloud CDN for cached content delivery.
By using Cloud Load Balancing, you can serve content as close as possible to your users on a system that can respond to over one million queries per second. Cloud Load Balancing is a fully distributed, software-defined managed service. It is not instance-based or device-based, so you do not need to manage a physical load balancing infrastructure.
Types of Cloud Load Balancing
The following table summarizes the characteristics of each Google Cloud load balancer, including whether the load balancer uses an internal or an external IP address, whether the load balancer is regional or global, and the supported traffic types.
|Internal or external||Load balancer type||Regional or global||Supported network tiers||Proxy or pass-through||Traffic type|
|Internal||Internal TCP/UDP||Regional||Premium only||Pass-through||TCP or UDP|
|Internal HTTP(S)||Regional||Premium only||Proxy||HTTP or HTTPS|
|External||Network TCP/UDP||Regional||Premium or Standard||Pass-through||TCP or UDP|
|TCP Proxy||Global in Premium Tier
Effectively regional1 in Standard Tier
|Premium or Standard||Proxy||TCP|
|SSL Proxy||Premium or Standard||Proxy||SSL|
|HTTP(S)||Premium or Standard||Proxy||HTTP or HTTPS|
1Effectively regional means that, while the backend service is global, if you choose Standard Tier, the external forwarding rule and external IP address must be regional, and the backend instance groups or network endpoint groups (NEGs) attached to the global backend service must be in the same region as the forwarding rule and IP address. For more information, see Configuring Standard Tier for HTTP(S) Load Balancing, TCP Proxy Load Balancing, and SSL Proxy Load Balancing.
Global versus regional load balancing
Use global load balancing when your backends are distributed across multiple regions, your users need access to the same applications and content, and you want to provide access by using a single anycast IP address. Global load balancing can also provide IPv6 termination.
Use regional load balancing when your backends are in one region, and you only require IPv4 termination.
External versus internal load balancing
Google Cloud load balancers can be divided into external and internal load balancers:
External load balancers distribute traffic coming from the internet to your Google Cloud Virtual Private Cloud (VPC) network. Global load balancing requires that you use the Premium Tier of Network Service Tiers. For regional load balancing, you can use Standard Tier.
Internal load balancers distribute traffic to instances inside of Google Cloud.
The following diagram illustrates a common use case: how to use external and
internal load balancing together. In the illustration, traffic from users in San
Francisco, Iowa, and Singapore is directed to an external load balancer, which
distributes that traffic to different regions in a Google Cloud network.
An internal load balancer then distributes traffic between the
The type of traffic that you need your load balancer to handle is another factor in determining which load balancer to use:
- HTTP and HTTPS traffic can be handled by external HTTP(S) Load Balancing or Internal HTTP(S) Load Balancing.
- TCP traffic can be handled by TCP Proxy Load Balancing, Network Load Balancing, or Internal TCP/UDP Load Balancing.
- UDP traffic can be handled by Network Load Balancing or Internal TCP/UDP Load Balancing.
Backend region and network
The following table summarizes support for backends residing in different VPC networks. The table also provides information about multi-NIC load balancing support.
|Load balancer type||Backend region and network||Multi-NIC notes|
|internal TCP/UDP load balancer||All backends must be in the same VPC network and the same region as the backend service. The backend service must also be in the same region and VPC network as the forwarding rule.||By using multiple load balancers, it can load balance to multiple NICs on the same backend.|
|internal HTTP(S) load balancer||All backends must be in the same VPC network and the same region as the backend service. The backend service must also be in the same region and VPC network as the forwarding rule.||The backend VM's
|external HTTP(S) load balancer, SSL proxy load balancer, TCP proxy load balancer||In Premium Tier: Backends can be in any region and any
In Standard Tier: Backends must be in the same region as the forwarding rule, but can be in any VPC network.
|The load balancer only sends traffic to the first network interface
The underlying technology of Google Cloud load balancers
This section provides more information about each type of Google Cloud load balancer, including links to overview documentation for a deeper understanding.
- Google Front Ends (GFEs) are software-defined, distributed systems that are located in Google points of presence (PoPs) and perform global load balancing in conjunction with other systems and control planes.
- Andromeda is Google Cloud's software-defined network virtualization stack.
- Maglev is a distributed system for Network Load Balancing.
- Envoy proxy is an open source edge and service proxy, designed for cloud-native applications.
Internal HTTP(S) Load Balancing
Internal HTTP(S) Load Balancing is built on the Andromeda network virtualization stack and is a managed service based on the open source Envoy proxy. This load balancer provides proxy-based load balancing of Layer 7 application data. You specify how traffic is routed with URL maps. The load balancer uses a private IP address that acts as the frontend to your backend instances.
External HTTP(S) Load Balancing
HTTP(S) Load Balancing is implemented on GFEs. GFEs are distributed globally and operate together using Google's global network and control plane. In Premium Tier, GFEs offer cross-regional load balancing, directing traffic to the closest healthy backend that has capacity and terminating HTTP(S) traffic as close as possible to your users.
Internal TCP/UDP Load Balancing
Internal TCP/UDP Load Balancing is built on the Andromeda network virtualization stack. Internal TCP/UDP Load Balancing enables you to load balance TCP/UDP traffic behind a private load balancing IP address that is accessible only to your internal virtual machine (VM) instances. By using Internal TCP/UDP Load Balancing, an internal load balancing IP address is configured to act as the frontend to your private backend instances. You use only internal IP addresses for your load balanced service. Overall, your configuration becomes simpler.
Internal TCP/UDP Load Balancing supports regional managed instance groups so that you can autoscale across a region, protecting your service from zonal failures.
External TCP/UDP Network Load Balancing
Network Load Balancing is built on Maglev. This load balancer enables you to load balance traffic on your systems based on incoming IP protocol data, including address, port, and protocol type. It is a regional, non-proxied load balancing system. Use Network Load Balancing for UDP traffic, and for TCP and SSL traffic on ports that are not supported by the SSL proxy load balancer and TCP proxy load balancer. A network load balancer is a pass-through load balancer that does not proxy connections from clients.
SSL Proxy Load Balancing
SSL Proxy Load Balancing is implemented on GFEs that are distributed globally. If you choose the Premium Tier of Network Service Tiers, an SSL proxy load balancer is global. In Premium Tier, you can deploy backends in multiple regions, and the load balancer automatically directs user traffic to the closest region that has capacity. If you choose the Standard Tier, an SSL proxy load balancer can only direct traffic among backends in a single region.
TCP Proxy Load Balancing
TCP Proxy Load Balancing is implemented on GFEs that are distributed globally. If you choose the Premium Tier of Network Service Tiers, a TCP proxy load balancer is global. In Premium Tier, you can deploy backends in multiple regions, and the load balancer automatically directs user traffic to the closest region that has capacity. If you choose the Standard Tier, a TCP proxy load balancer can only direct traffic among backends in a single region.