All posts
Written by Sujith Quintelier β€’ Jun 17, 2022

πŸ” Azure Load Balancing Explained: Choosing the Right Option

Jun 17, 2022

What is Load Balancing?

Load balancing is the even distribution of network traffic across a group of backend computing resources or servers. The primary goals of load balancing are:

βœ… Optimizing resource utilization
βœ… Maximizing throughput & performance
βœ… Minimizing response time
βœ… Ensuring high availability
βœ… Preventing overload on a single resource

In Azure, there are multiple load-balancing options, each designed for different traffic types and use cases.


πŸ” Azure Load Balancing Options

ServiceScopeRecommended forLayer
Azure Load BalancerRegionalNon-HTTP(S) workloadsLayer 4
Traffic ManagerGlobalDNS-based traffic routingLayer 7 (DNS)
Azure Application GatewayRegionalHTTP(S) web trafficLayer 7
Azure Front DoorGlobalWeb applications, API accelerationLayer 7
Load Balancing Decision Tree
Load Balancing Decision Tree

Now, let’s explore each of these services in detail.


🌍 Azure Load Balancer (ALB)

Azure Load Balancer
Azure Load Balancer

Azure Load Balancer is a Layer 4 (TCP/UDP) load-balancing service designed for high-performance and ultra-low-latency traffic. It efficiently distributes inbound and outbound traffic while ensuring high availability across Availability Zones.

Types of Azure Load Balancers

TypePurpose
Public Load BalancerDistributes internet-facing traffic across VMs in a VNet.
Internal Load BalancerDistributes private network traffic within Azure.
ALB Public vs Internal
ALB Public vs Internal

Availability Zone Configurations

ModeBehavior
Zone RedundantUses a single IP, surviving zone failures.
ZonalRestricts traffic to a specific zone.
ALB Zone Redundant
ALB Zone Redundant

Standard vs. Basic Load Balancer

FeatureStandardBasic
Backend pool size1000 VMs300 VMs
Health probesTCP, HTTP, HTTPSTCP, HTTP
Secure by defaultβœ… Yes❌ No
HA Portsβœ… Available❌ Not available
SLAβœ… 99.99%❌ Not available

🌐 Azure Traffic Manager (ATM)

Azure Traffic Manager
Azure Traffic Manager

Traffic Manager is a DNS-based global load balancer, designed to distribute traffic across multiple Azure regions. It does not directly route trafficβ€”instead, it resolves requests to the nearest healthy backend.

How It Works

1️⃣ A client requests a domain (e.g., app.contoso.com).
2️⃣ The DNS system redirects to contoso.trafficmanager.net.
3️⃣ Traffic Manager selects a backend using health checks & routing rules.
4️⃣ The client receives the IP of the closest, available backend and connects directly.

Azure Traffic Manager Setup
Azure Traffic Manager Setup

Routing Methods

Routing MethodUse Case
PriorityPrimary backend with failover options.
WeightedDistribute traffic based on weights.
PerformanceRoute traffic to the closest backend.
GeographicRoute traffic based on user location.
MultiValueReturn multiple healthy endpoints.
SubnetRoute based on user IP ranges.
Traffic Manager Routing
Traffic Manager Routing

Traffic Manager is ideal for:
βœ”οΈ Failover between Azure regions
βœ”οΈ Multi-region deployments
βœ”οΈ Hybrid cloud environments


πŸ”Ή Azure Application Gateway (APG)

Azure Application Gateway
Azure Application Gateway

Application Gateway is a Layer 7 load balancer designed specifically for HTTP(S) traffic. It provides advanced web traffic routing, SSL offloading, and Web Application Firewall (WAF) integration.

Key Features

βœ… Path-based routing β†’ Direct requests to different backends based on URL paths.
βœ… Session affinity β†’ Keep users connected to the same backend server.
βœ… SSL Termination β†’ Offload SSL decryption to reduce backend CPU usage.
βœ… Autoscaling β†’ Dynamically scale based on traffic load.

Application Gateway Flow
Application Gateway Flow

Best for:
βœ”οΈ Web applications that require advanced traffic routing.
βœ”οΈ Security-conscious deployments using WAF protection.


🌎 Azure Front Door (AFD)

Azure Front Door
Azure Front Door

Azure Front Door is a global Layer 7 service that combines load balancing, caching, acceleration, and security into one solution. It ensures high availability and low-latency for web applications.

Key Capabilities

βœ… Global HTTP(S) load balancing β†’ Route traffic to the nearest healthy region.
βœ… SSL offloading & URL rewriting β†’ Enhance security & performance.
βœ… Caching & acceleration β†’ Reduce latency via Edge locations.
βœ… DDoS Protection & WAF β†’ Secure web apps from threats.

πŸ’‘ Front Door vs. Traffic Manager:
πŸ”Ή Front Door β†’ Routes traffic in real-time based on latency.
πŸ”Ή Traffic Manager β†’ Routes via DNS resolution, which is slower due to caching.

Best for:
βœ”οΈ Global applications that need low latency.
βœ”οΈ Web APIs requiring intelligent traffic routing.


🌍 Global vs. Regional Load Balancing

ServiceScopeUse Case
Azure Front DoorGlobalHTTP(S) traffic acceleration & load balancing.
Traffic ManagerGlobalDNS-based traffic routing.
Application GatewayRegionalWeb application load balancing.
Azure Load BalancerRegionalNon-HTTP(S) workloads.

πŸ’‘ When to Choose Which?

ScenarioRecommended Service
Distribute global HTTP(S) trafficAzure Front Door
Route traffic between regions via DNSTraffic Manager
Load balance internal traffic within AzureAzure Load Balancer
Optimize web application performanceAzure Application Gateway

πŸ“Œ Final Thoughts

Azure offers multiple load balancing solutions, each designed for specific traffic types, regions, and use cases. Whether you’re building a global web application or optimizing regional traffic, choosing the right service is key to maximizing performance, availability, and security.

πŸ’‘ Summary:
βœ”οΈ Use Front Door for global web acceleration.
βœ”οΈ Use Traffic Manager for DNS-based failover.
βœ”οΈ Use Application Gateway for web app security & routing.
βœ”οΈ Use Azure Load Balancer for high-performance, low-latency workloads.

comments powered by Disqus