Deliver scalable and resilient internal-only services on GCP
Internal Load Balancing in 5 mins Deliver scalable and resilient - - PowerPoint PPT Presentation
Internal Load Balancing in 5 mins Deliver scalable and resilient - - PowerPoint PPT Presentation
Internal Load Balancing in 5 mins Deliver scalable and resilient internal-only services on GCP Google Cloud Load Balancing HTTP(S) Load SSL proxy Global Balancing Network TCP/UDP Internal TCP/UDP Regional Load Balancing Load Balancing
Google Cloud Load Balancing
Connection Draining Autoscaling Cross-region failover Health Checks Global Load Balancing Request Routing Hash-based LB algorithm Capacity-based LB algorithm Cloud CDN Affinity Logging Monitoring HTTP(S) Load Balancing SSL proxy Network TCP/UDP Load Balancing Internal TCP/UDP Load Balancing
Global Regional
Client IP preserved Internal (RFC 1918) Load Balancing Health checks (TCP, HTTP, HTTPS) Autoscaling (no prewarming) Session Affinity gcloud CLI REST API Console
Src IP: 10.10.10.1 Dst IP: 10.10.10.200 Src IP: 10.10.10.1 Dst IP: 10.10.10.200 Backend B Client A LB IP: 10.10.10.1
X
Internal Load Balancing
Google Cloud Platform US Central region
10.240.0.1 10.240.0.2
192.168.1.1
10.240.0.3 172.16.1.1 Zone: us-central1-a
Subnet 3 Subnet 1 Subnet 2
192.168.1.5
Zone: us-central1-c Zone: us-central1-b
Internal Load Balancing Example
Client instances
Internal LB IP 10.240.0.200
Network: shopnet
Backends running shopping cart application Logical representation of the ILB, there is no LB instance between client and backend instances
Backend instance
...... Internal LB
Virtual Network Client instance
......
VIP VIP VIP Backend instance Backend instance Client instance IP1 IP2 Backend
......
Load Balancer instance(s)
Client instance
......
IP4 IP3 IP5 Backend Backend Client instance IP1 IP2 VIP IP3 IP4 IP5
Andromeda
Under the hood: Software-defined load balancing
Software-defined Internal Load Balancing on GCP Typical Instance-based Internal Load Balancing
Load Balancers can become choke points There is no load balancer in the path between your client and backend instances
Internal Load Balancing is delivered using Andromeda, GCP’s software-defined network virtualization stack
6
Infrastructure & Operations
6
Configuring Internal Load Balancing (console)
Forwarding Rule Regional Backend Service
Region X
Client Instance Instance 1 Instance 2
Instance Group 1
Instance 3 Instance 4
Instance Group 2
Instance 5 Instance 6
Instance Group 3
Backend 2 Backend 3 Backend 1 Backend Configuration Internal LB IP, port configuration
Subnet A Subnet B
Internal Load Balancing Configuration
- 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 TCP ILB
- 3. Specify you want to load balance traffic between your instances (internal)
Specify you want internal load 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 (or list of ports)
- 6. Click “create” and your ILB is ready to distribute traffic!
Click Create. Done!
14
Infrastructure & Operations
14 14
Internal Load Balancing Use Cases
ILB Use Case 1: Scaling and HA for internal (micro)services
SHOPPPING CART SHOPPING CART SHOPPPING CART
CATALOG CATALOG
RECOMMEND RECOMMEND
Google Cloud Platform Application composed of ILB-scaled services
Internal Load Balancer Internal Load Balancer Internal Load Balancer
Load balance across multiple instances of your internal service
User in San Francisco
Web Tier Internal Tier Web Tier Internal Tier us-central-1a us-central-1b
User in Iowa
100.1.1.1, Port: 80 Internal Load Balancing IP: 10.10.10.10, Port: 80
Web Tier Internal Tier
Internal Load Balancing IP: 10.20.1.1, Port: 80
asia-east-1a
User in Singapore
Database Tier Database Tier Database Tier
External Load Balancing Global: HTTP(S) LB, SSL Proxy Regional: Network TCP/UDP LB
Internal Load Balancing
ILB Use Case 2: Multi-tier apps
Internal Tier with Internal Load Balancing Web Tier with external load balancing
ILB Use Case 3: Scale-out and HA for virtual appliances
Virtual Appliance Instance 2 Virtual Appliance Instance 3 Virtual Appliance Instance 1
10.0.0.2 10.0.0.3 10.0.0.4
Internal Load Balancer Google Cloud Platform
‹#›
https://cloud.google.com/compute/docs/load-balancing/internal/ Learn more