Provision cross-region internal Application LB with automatic failover, health checks and geo-routing
Naveen Mandadhi
Strategic Cloud Engineer
Adam Cole
Strategic Cloud Engineer
Google Cloud offers a variety of load balancing solutions which simplify the management of networking infrastructure and support different types of backend services. Now available, the cross-region internal Application Load Balancer expands this coverage by providing integrations to load balance, geo-route, and automatically failover to backends in multiple regions. In this walkthrough we’ll focus on workloads in Google Kubernetes Engine (GKE). This enables the following capabilities:
- Global load balancing: Support for backends in multiple regions
- Improved performance, reliability and high availability: Distributing traffic across multiple regions, and automatic failover to services in other regions
- Geo routing: Cloud DNS policy manager to route traffic to nearest healthy backends
- Managed certificates support: Google-managed/Self-managed certificates
Initial project setup and enable required APIs
VPC network setup
Components: VPC network with 2 subnets in us-central1 and us-east1, for two GKE clusters
Create GKE clusters
Create a Bastion host, install tools and get cluster credentials
Deploy sample GKE backends:
Configuring the Load Balancer
Create Proxy-only subnets
Create firewall rules to allow TCP application traffic and health checks to the backends
Create the resources to set up the Load Balancer, components shown in the architecture diagram above
Create DNS zone with geo-routing
Test the Load Balancer and geo-routing
Querying the load balancer from a VM in each region shows that Cloud DNS routes the requests to the closest backends.
Test automatic failover
To test, scale down the deployment in one region. Running the same command as above, we can see that the requests failover to us-central1 now, since there are no healthy endpoints in us-east1 anymore.
Learn more
To learn more on this topic please checkout the links below.
- Documentation: Set up a cross-region internal Application Load Balancer with hybrid connectivity
- Documentation: Internal Application Load Balancer overview
- Documentation: DNS policies overview | Google Cloud