3.1 Azure Load Balancer and Traffic Manager
📘Microsoft Azure Networking Solutions (AZ-700)
Overview
In Microsoft Azure, a load balancer is a service that distributes network traffic across multiple resources (like virtual machines) to ensure high availability, performance, and reliability. Choosing the right type of load balancer—regional or global—is critical for designing scalable and resilient architectures.
1. Regional Load Balancers
Definition
- A regional load balancer operates within a single Azure region.
- It distributes traffic only to resources in that region.
Azure Services that Use Regional Load Balancers
- Azure Load Balancer (Standard and Basic)
- Application Gateway (regional by default)
Key Features
- Scope: Regional (one Azure region).
- Traffic Handling: Balances traffic between VMs, scale sets, or internal services in that region.
- Public & Private Endpoints: Can have a public IP for external traffic or a private IP for internal traffic.
- Health Probes: Monitors the health of backend resources to avoid sending traffic to unhealthy VMs.
- Performance: High throughput for intra-region traffic.
IT Example
- You have a web application deployed in East US with multiple VMs.
- A regional load balancer will distribute user requests only to East US VMs, ensuring even traffic distribution and high availability within that region.
2. Global Load Balancers
Definition
- A global load balancer can route traffic across multiple Azure regions.
- It ensures users are directed to the closest or healthiest region.
Azure Services that Use Global Load Balancers
- Azure Traffic Manager
- Front Door (also acts as global HTTP/HTTPS load balancer)
Key Features
- Scope: Global (multiple regions).
- Traffic Routing Methods: Traffic Manager supports several routing methods:
- Priority: Direct traffic to a primary region; failover if it goes down.
- Weighted: Distribute traffic by percentage across regions.
- Performance: Direct users to the region with the lowest latency.
- Geographic: Route traffic based on user location.
- Health Monitoring: Continuously checks endpoints in each region.
- High Availability Across Regions: Ensures services remain online even if a whole region fails.
IT Example
- Your web application has VMs in East US, West Europe, and Southeast Asia.
- A global load balancer like Traffic Manager will route users to the closest healthy region, reducing latency and ensuring continuity if one region goes offline.
3. Key Differences: Regional vs Global
| Feature | Regional Load Balancer | Global Load Balancer |
|---|---|---|
| Scope | Single Azure region | Multiple Azure regions |
| Routing | Within region | Across regions |
| Traffic Types | TCP/UDP, HTTP/HTTPS | DNS-based routing (Traffic Manager) or HTTP/HTTPS (Front Door) |
| Health Monitoring | Regional backend VMs | Global endpoints across regions |
| High Availability | Ensures intra-region HA | Ensures multi-region HA |
| Use Case | Internal apps, single-region websites | Global websites, disaster recovery, geo-distribution |
4. Exam Tips
- Remember the scope:
- Regional = one region
- Global = multiple regions
- Traffic types matter:
- Use regional load balancer for raw TCP/UDP traffic.
- Use global load balancer for multi-region, latency-sensitive traffic.
- Service selection:
- Azure Load Balancer = regional
- Traffic Manager = global
- Front Door = global HTTP/HTTPS
- Health probes are always important:
- Ensure traffic only goes to healthy endpoints, whether regional or global.
- Multi-region disaster recovery:
- Only global load balancers can handle failover across regions automatically.
5. Decision Guide for the Exam
- Use a Regional Load Balancer if:
- Your services are in one region.
- You need high throughput for TCP/UDP traffic.
- You want internal or external load balancing within the region.
- Use a Global Load Balancer if:
- Your services are in multiple regions.
- You need geo-routing or performance-based routing.
- You require automatic failover between regions for disaster recovery.
Summary
- Regional Load Balancer: Distributes traffic within a single region, good for intra-region reliability.
- Global Load Balancer: Distributes traffic across regions, ensures low-latency access and disaster recovery.
- Always pick based on scope, traffic type, and HA requirements.
