This document introduces the concepts that you need to understand how to configure an external Application Load Balancer.
An external Application Load Balancer is a proxy-based Layer 7 load balancer that enables you to run and scale your services behind a single external IP address. The external Application Load Balancer distributes HTTP and HTTPS traffic to backends hosted on a variety of Google Cloud platforms (such as Compute Engine, Google Kubernetes Engine (GKE), and Cloud Storage), as well as external backends connected over the internet or through hybrid connectivity. For details, see Application Load Balancer overview: Use cases.
Modes of operation
You can configure an external Application Load Balancer in the following modes:
- Global external Application Load Balancer. This is a global load balancer that is implemented as a managed service on Google Front Ends (GFEs). It uses the open-source Envoy proxy to support advanced traffic management capabilities such as traffic mirroring, weight-based traffic splitting, and request-based or response-based header transformations.
- Classic Application Load Balancer. This is the classic external Application Load Balancer that is global in Premium Tier but can be configured to be regional in Standard Tier. This load balancer is implemented on Google Front Ends (GFEs). GFEs are distributed globally and operate together using Google's global network and control plane.
- Regional external Application Load Balancer. This is a regional load balancer that is implemented as a managed service on the open-source Envoy proxy. It includes advanced traffic management capabilities such as traffic mirroring, weight-based traffic splitting, and request-based or response-based header transformations.
| Load balancer mode | Recommended use cases | Capabilities |
|---|---|---|
| Global external Application Load Balancer | Use this load balancer for external HTTP(S) workloads with globally dispersed users or backend services in multiple regions. |
|
| Classic Application Load Balancer | This load balancer is global in Premium Tier. In the Premium Network Service Tier, this load balancer offers multi-region load balancing, attempts to direct traffic to the closest healthy backend that has capacity, and terminates HTTP(S) traffic as close as possible to your users. For details about the request distribution process, see Traffic distribution. In the Standard Network Service Tier, this load balancer can distribute traffic to backends in a single region only. |
|
| Regional external Application Load Balancer | This load balancer contains many of the features of the existing classic Application Load Balancer, along with advanced traffic management capabilities. Use this load balancer if you want to serve content from only one geolocation (for example, to meet compliance regulations). This load balancer can be configured in either Premium or Standard Tier. |
|
Identify the mode
Console
In the Google Cloud console, go to the Load balancing page.
In the Load Balancers tab, the load balancer type, protocol, and region are displayed. If the region is blank, then the load balancer is global. The following table summarizes how to identify the mode of the load balancer.
| Load balancer mode | Load balancer type | Access type | Region |
|---|---|---|---|
| Global external Application Load Balancer | Application | External | |
| Classic Application Load Balancer | Application (Classic) | External | |
| Regional external Application Load Balancer | Application | External | Specifies a region |
gcloud
To determine the mode of a load balancer, run the following command:
gcloud compute forwarding-rules describe FORWARDING_RULE_NAME
In the command output, check the load balancing scheme, region, and network tier. The following table summarizes how to identify the mode of the load balancer.
| Load balancer mode | Load balancing scheme | Forwarding rule | Network tier |
|---|---|---|---|
| Global external Application Load Balancer | EXTERNAL_MANAGED | Global | Premium |
| Classic Application Load Balancer | EXTERNAL | Global | Standard or Premium |
| Regional external Application Load Balancer | EXTERNAL_MANAGED | Specifies a region | Standard or Premium |
Architecture
The following resources are required for an external Application Load Balancer deployment:
For regional external Application Load Balancers only, a proxy-only subnet is used to send connections from the load balancer to the backends.
An external forwarding rule specifies an external IP address, port, and target HTTP(S) proxy. Clients use the IP address and port to connect to the load balancer.
A target HTTP(S) proxy receives a request from the client. The HTTP(S) proxy evaluates the request by using the URL map to make traffic routing decisions. The proxy can also authenticate communications by using SSL certificates.
- For HTTPS load balancing, the target HTTPS proxy uses SSL certificates to prove its identity to clients. A target HTTPS proxy supports up to the documented number of SSL certificates.
The HTTP(S) proxy uses a URL map to make a routing determination based on HTTP attributes (such as the request path, cookies, or headers). Based on the routing decision, the proxy forwards client requests to specific backend services or backend buckets. The URL map can specify additional actions, such as sending redirects to clients.
A backend service distributes requests to healthy backends. The global external Application Load Balancers also support backend buckets. One or more backends must be connected to the backend service or backend bucket.
A health check periodically monitors the readiness of your backends. This reduces the risk that requests might be sent to backends that can't service the request.
Firewall rules for your backends to accept health check probes. Regional external Application Load Balancers require an additional firewall rule to allow traffic from the proxy-only subnet to reach the backends.
- Global
This diagram shows the components of a global external Application Load Balancer deployment. This architecture applies to both, the global external Application Load Balancer, and the classic Application Load Balancer in Premium Tier.
Global external Application Load Balancer components (click to enlarge).
- Regional
This diagram shows the components of a regional external Application Load Balancer deployment.
Regional external Application Load Balancer components (click to enlarge).
Proxy-only subnet
Proxy-only subnets are only required for regional external Application Load Balancers.
The proxy-only subnet provides a set of IP addresses that Google uses to run
Envoy proxies on your behalf. You must create one proxy-only subnet in each
region of a VPC network where you use regional external Application Load Balancers.
The --purpose flag for this proxy-only subnet is set to
REGIONAL_MANAGED_PROXY. All regional Envoy-based load
balancers in the same region
and VPC network share a pool of Envoy proxies from the same
proxy-only subnet. Further:
- Proxy-only subnets are only used for Envoy proxies, not your backends.
- Backend VMs or endpoints of all regional external Application Load Balancers in a region and VPC network receive connections from the proxy-only subnet.
- The IP address of the regional external Application Load Balancer is not located in the proxy-only subnet. The load balancer's IP address is defined by its external managed forwarding rule, which is described below.
- Proxy-only subnets can be configured with a stack type of
IPV4_IPV6orIPV4_ONLY.
If you previously created a proxy-only subnet with
--purpose=INTERNAL_HTTPS_LOAD_BALANCER, migrate the subnet's
purpose to
REGIONAL_MANAGED_PROXY before you can create other Envoy-based load balancers
in the same region of the VPC
network.
Forwarding rules and IP addresses
Forwarding rules route traffic by IP address, port, and protocol to a load balancing configuration consisting of a target proxy, URL map, and one or more backend services.
IP address specification. Each forwarding rule provides a single IP address that can be used in DNS records for your application. No DNS-based load balancing is required. You can either specify the IPv4 or IPv6 address to be used or let Cloud Load Balancing assign one for you.
Port specification. Each forwarding rule for an Application Load Balancer can reference a single port from 1-65535. To support multiple ports, you must configure multiple forwarding rules. You can configure multiple forwarding rules to use the same external IP address (VIP) and to reference the same target HTTP(S) proxy as long as the overall combination of IP address, port, and protocol is unique for each forwarding rule. This way, you can use a single load balancer with a shared URL map as a proxy for multiple applications.
The type of forwarding rule, IP address, and load balancing scheme used by external Application Load Balancers depends on the mode of the load balancer and which Network Service Tier the load balancer is in.
| Load balancer mode | Network Service Tier | Forwarding rule, IP address, and load balancing scheme | Routing from the internet to the load balancer frontend |
|---|---|---|---|
| Global external Application Load Balancer | Premium Tier |
Global external forwarding rule Load balancing scheme: |
Requests routed to the GFE that is closest to the client on the internet. |
| Classic Application Load Balancer | Premium Tier |
Global external forwarding rule Load balancing scheme: |
Requests routed to the GFE that is closest to the client on the internet. |
| Standard Tier |
Regional external forwarding rule Load balancing scheme: |
Requests routed to a GFE in the load balancer's region. | |
| Regional external Application Load Balancer | Premium Tier or Standard Tier |
Regional external forwarding rule Load balancing scheme: |
Requests reach Google Cloud at the PoP closest to the client. Requests are then routed over Google Cloud's premium backbone until they reach Envoy proxies in the same region as the load balancer. |
EXTERNAL_MANAGED backend services to
EXTERNAL forwarding rules. However, EXTERNAL backend
services cannot be attached to EXTERNAL_MANAGED forwarding rules.
To take advantage of new features available
only with the global external Application Load Balancer, we
recommend that you migrate your existing EXTERNAL resources to
EXTERNAL_MANAGED by using the migration process described at
Migrate
resources from classic to global external Application Load Balancer.
For the complete list of protocols supported by external Application Load Balancer forwarding rules in each mode, see Load balancer features.
Forwarding rules and VPC networks
This section describes how forwarding rules used by external Application Load Balancers are associated with VPC networks.