Why Load Balancing Matters
Modern applications are accessed globally, require high availability, and must scale to handle spikes in traffic. In Azure, multiple services handle load balancing and traffic distribution — each optimized for specific scenarios.
As a Solution Architect, you must know which service to use where to ensure performance, resiliency, and cost-effectiveness.
1. Azure Load Balancer (ALB)
Definition:
-
Layer 4 (TCP/UDP) load balancer.
-
Distributes traffic across VMs or instances.
Key Features:
-
Supports inbound and outbound traffic.
-
High availability within a region.
-
No SSL termination (works only at transport layer).
Best Use Cases:
-
Internal or external load balancing at VM level.
-
Network traffic distribution (not app-level).
-
Scenarios requiring millions of requests per second at low latency.
2. Application Gateway (AppGW)
Definition:
-
Layer 7 (HTTP/HTTPS) load balancer.
-
Provides Application Delivery Controller (ADC) capabilities.
Key Features:
-
SSL termination and end-to-end TLS.
-
Path-based routing (/images → one backend, /videos → another).
-
Host-based routing (domain1.com vs domain2.com).
-
Built-in Web Application Firewall (WAF) to protect against SQL injection, XSS, etc.
Best Use Cases:
-
Web applications needing intelligent routing.
-
Scenarios requiring SSL offloading or WAF protection.
3. Azure Front Door
Definition:
-
Global, Layer 7 load balancer and application accelerator.
-
Uses Microsoft’s global edge network.
Key Features:
-
Global HTTP/HTTPS load balancing.
-
Anycast-based routing for lowest-latency user access.
-
Built-in CDN caching for static content.
-
Supports SSL termination, URL rewrite, and WAF.
Best Use Cases:
-
Global websites requiring low latency worldwide.
-
Multi-region failover for web applications.
-
Content-heavy apps needing CDN integration.
4. Content Delivery Network (CDN)
Definition:
-
Distributed caching service to accelerate content delivery.
Key Features:
-
Caches static content at edge locations worldwide.
-
Reduces load on origin servers.
-
Supports custom rules (cache duration, compression).
Best Use Cases:
-
Delivering images, videos, documents globally.
-
Reducing latency for static content distribution.
Design Considerations
-
Load Balancer → for regional, transport-level load distribution (VMs, AKS nodes).
-
Application Gateway → for intelligent routing + WAF for web apps.
-
Front Door → for global distribution, latency-based routing, CDN features.
-
CDN → for static content acceleration at the edge.
Often, these services are combined in layered designs.
Example Enterprise Scenario
A multinational e-commerce platform requires:
-
Global distribution of its website with minimal latency.
-
Intelligent routing of /checkout and /media to different backends.
-
Protection from common web attacks.
-
Fast delivery of product images worldwide.
Correct design:
-
Use Front Door for global entry point and latency-based routing.
-
Use Application Gateway with WAF for checkout process.
-
Use CDN for product images.
-
Use Load Balancer internally to distribute across VM instances.
Confusion Buster
-
Load Balancer vs App Gateway:
-
LB = Layer 4, simple traffic distribution.
-
AppGW = Layer 7, intelligent routing + WAF.
-
-
App Gateway vs Front Door:
-
AppGW = regional, inside Azure region.
-
Front Door = global, edge network distribution.
-
-
Front Door vs CDN:
-
Front Door = global load balancer + CDN-like features.
-
CDN = pure caching solution.
-
Exam Tips
-
“Which service for TCP-level distribution of VM traffic?” → Load Balancer.
-
“Which service for path-based routing and WAF?” → Application Gateway.
-
“Which service for global latency-based routing?” → Front Door.
-
“Which service for global caching of static files?” → CDN.
-
“Which design combines intelligent routing with edge caching?” → Front Door + CDN.
What to Expect in the Exam
-
Direct Q: “Which Azure service distributes traffic across VMs at TCP/UDP level?” → Load Balancer.
-
Scenario Q: “Global website needs worldwide low latency with WAF.” → Azure Front Door.
-
Scenario Q: “App requires routing /api to one backend and /media to another.” → Application Gateway.
-
Trick Q: “Load Balancer can terminate SSL.” → False.