About subnets for load balancing

This page provides an overview of subnets in Google Distributed Cloud (GDC) air-gapped and their role in your load balancing efforts. A subnet, or subnetwork, represents a logical subdivision of an IP network. This segmentation enhances network efficiency, security, and manageability. For more information on subnets, see Subnets and IP addresses in GDC.

This page is for developers within the application operator group who want to establish a secure air-gapped connection and balance workloads across zones. For more information, see Audiences for GDC air-gapped documentation.

Global subnets for load balancing

A global subnet is a subnet created within the global API server. These subnets are required for global external load balancers (ELB) and internal load balancers (ILB). Global subnets enable the allocation of IP addresses that are accessible across different parts of a global infrastructure, spanning multiple GDC zones.

You use global subnets to complete the following tasks:

  • Provide parent CIDRs for ILB IP addresses: A global parent subnet of type Branch can be created to manage a pool of IP addresses specifically for internal load balancers.
  • Allocate single IP addresses for ILB and ELB services: Global leaf subnets are used to reserve a single Virtual IP (VIP) address for a specific ILB or ELB.
  • Enable anycast IPs for ELBs: For ELBs, a specific global parent subnet is used to allocate anycast IP addresses, which are essential for global external accessibility.

Subnets and forwarding rules

The direct link between a global subnet and a load balancer's functionality is established through the forwarding rule resource. A forwarding rule references a global leaf subnet to obtain the VIP address that clients use to access the load balancing service.

Here's an example showing how the configuration works:

  1. A global leaf subnet is created with a prefixLength value of 32, indicating that the subnet allocates a single IP address.
  2. This allocated IP address, identified by the name of the leaf subnet, is then specified in the cidrRef field of either a ForwardingRuleInternal resource for ILBs or ForwardingRuleExternal resource for ELBs.
  3. This link makes the load balancer's forwarding rule use a dedicated and globally managed IP address provided by the subnet.

What's next