Internal Load Balancing in 5 mins
Deliver scalable and resilient internal-only services on GCPGoogle Cloud Load Balancing
GlobalHTTP(S) LoadBalancing

SSL proxyRegional

Internal TCP/UDP
Load Balancing

Network TCP/UDP
Load Balancing

Request Routing

Hash-based LB
algorithm

Capacity-based LB
algorithm

Global LoadBalancing

Health Checks

Connection
Draining

Autoscaling

Cross-region
failoverAffinity

Logging

Monitoring

Cloud CDN

Internal Load Balancing

LB IP:
10.10.10.1

Internal (RFC 1918)
Load Balancing

Src IP: 10.10.10.1
Dst IP: 10.10.10.200

Src IP: 10.10.10.1
Dst IP: 10.10.10.200

Client IP preserved

REST API

Client AX
Health checks(TCP, HTTP, HTTPS)

Autoscaling(no prewarming)

gcloud CLI

ConsoleBackend B

Session Affinity

Internal Load Balancing Example

Subnet 1

Client instances

Subnet 2

Subnet 3

Internal LB IP
10.240.0.200

10.240.0.1

192.168.1.5

10.240.0.2

Zone: us-central1-b192.168.1.1

Zone: us-central1-a172.16.1.1

10.240.0.3
Zone: us-central1-c

Network: shopnet
Google Cloud Platform US Central region

Logical representation of the ILB, there is no LB instance between client and backend instances

Backends running shopping cart application

Internal Load Balancing
is delivered using
Andromeda, GCP’s
software-defined
network virtualization
stack

Under the hood: Software-defined load balancing
Andromeda

Load Balancers can becomechoke points

Clientinstance......

IP1

There is no load balancer inthe path between your client
and backend instances

Clientinstance
IP2

Clientinstance......

Clientinstance

IP1

IP2

Virtual Network

VIP

Load Balancer
instance(s)

IP3

IP4

BackendBackend

Internal LB

IP5......

Backend

Typical Instance-based Internal Load Balancing

VIP

VIP

Backendinstance

Backendinstance

IP3

IP4

VIP

......

BackendinstanceIP5

Software-defined Internal Load Balancing on GCP

Configuring Internal Load Balancing(console)

Infrastructure & Operations

6Internal Load Balancing Configuration
ClientInstanceInternal LB IP, port
configuration

Forwarding Rule

Regional Backend Service

Backend 1

Backend 2

Backend 3

Instance 2

Instance 3

Instance 4

Instance Group 3

Instance 1

Instance Group 2Instance Group 1

Backend Configuration

Instance 5

Instance 6

Subnet B

Subnet A
Region X

1. Click “create load balancer” to get started
Click Create

2. Select the type of Internal Load Balancer- either TCP or UDP

Click here for TCPILB

3. Specify you want to load balance traffic between your instances (internal)

Specify you want internalload balancing

4. Configure backends in your region of choice

Configure backends

Remember to open up firewall
for ILB health checks5. Configure your RFC 1918 Internal LB IP (specify or let ILB auto-allocate)

Configure Internal Load
Balancing IP and port (orlist of ports)

6. Click “create” and your ILB is ready to distribute traffic!

Click Create.
Done!

Internal Load Balancing Use Cases

Infrastructure & Operations

14

ILB Use Case 1: Scaling and HA for internal (micro)services
Load balance across multiple
instances of your internal service
Internal Load Balancer

Internal Load Balancer

Internal Load Balancer

RECOMMEND

SHOPPPINGCARTSHOPPPING
CARTRECOMMEND

SHOPPING
CARTCATALOGCATALOG

Google Cloud Platform Application composed of ILB-scaled services

ILB Use Case 2: Multi-tier apps

Web Tier

User in San Francisco

External Load Balancing
Global: HTTP(S) LB, SSL Proxy
Regional: Network TCP/UDP LB

Internal Load Balancing

Web Tier with external loadbalancing

IP: 10.10.10.10, Port: 80

Internal Load Balancing

Web Tier

Database Tier
Internal Tier

Internal Tier

User in Singapore

Internal Tier with Internal LoadBalancing

Database Tier

us-central-1b100.1.1.1, Port: 80

Web Tier

IP: 10.20.1.1,
Port: 80
Internal Load Balancing

User in Iowa

us-central-1a

Database Tier
Internal Tier
asia-east-1a

ILB Use Case 3: Scale-out and HA for virtual appliancesInternal Load Balancer

10.0.0.2

Virtual Appliance
Instance 1

10.0.0.3

10.0.0.4

Virtual Appliance
Instance 2

Virtual Appliance
Instance 3

Google Cloud PlatformLearn morehttps://cloud.google.com/compute/docs/load-balancing/internal/‹#›