Jump to Content
Networking

Provision cross-region internal Application LB with automatic failover, health checks and geo-routing

October 26, 2023
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:

  1. Global load balancing: Support for backends in multiple regions
  2. Improved performance, reliability and high availability: Distributing traffic across multiple regions, and automatic failover to services in other regions
  3. Geo routing: Cloud DNS policy manager to route traffic to nearest healthy backends
  4. Managed certificates support: Google-managed/Self-managed certificates
https://storage.googleapis.com/gweb-cloudblog-publish/images/1-cross_region_internal_ALB.max-1400x1400.jpg

Initial project setup and enable required APIs

Loading...

VPC network setup

Components: VPC network with 2 subnets in us-central1 and us-east1, for two GKE clusters

Loading...

Create GKE clusters

Loading...

Create a Bastion host, install tools and get cluster credentials

Loading...

Deploy sample GKE backends:

Loading...

Loading...

Configuring the Load Balancer

Create Proxy-only subnets

Loading...

Create firewall rules to allow TCP application traffic and health checks to the backends

Loading...

Create the resources to set up the Load Balancer, components shown in the architecture diagram above

Loading...

Create DNS zone with geo-routing

Loading...

Test the Load Balancer and geo-routing

Loading...

Querying the load balancer from a VM in each region shows that Cloud DNS routes the requests to the closest backends.

Loading...

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.

Loading...

Learn more

To learn more on this topic please checkout the links below.

Posted in