- Explain the core concept of a load balancer and how it acts as a traffic cop, distributing incoming network requests to backend resources to maintain reliability and consistent performance as demand varies.
- Identify and compare the primary Azure load balancing solutions:
- Azure Load Balancer — Layer 4 (transport) scenarios for TCP/UDP traffic.
- Application Gateway — Layer 7 (HTTP/HTTPS) routing with web application features such as WAF.
- Traffic Manager — DNS-based global routing for geographic or performance-based failover.
- Azure Front Door — global HTTP/HTTPS load balancing, acceleration, and edge features.
- Choose the right Azure service based on application requirements (traffic type, availability, latency, and architectural constraints).
Tip: If you’re new to networking, review TCP/UDP and HTTP request flow in the Networks and Communications course before comparing Layer 4 and Layer 7 behaviors — that background will make protocol differences easier to understand.
Load balancing fundamentals
A load balancer distributes client requests across multiple backend instances to:- Increase application availability by avoiding single points of failure.
- Improve performance by distributing load and enabling horizontal scaling.
- Provide fault tolerance and allow graceful handling of instance failures.
- Front-end: The public (or internal) IP and port where clients connect.
- Back-end pool: The set of VMs, VM scale sets, App Service instances, or endpoints that receive traffic.
- Health probes: Periodic checks that determine whether a backend instance is healthy and can receive traffic.
- Session affinity (sticky sessions): Optional configuration to route a client consistently to the same backend.
Azure load balancing services at a glance
Below is a short summary of each Azure load balancing product and its ideal use cases.- Azure Load Balancer
- Layer: 4 (TCP/UDP)
- Use case: High-performance, low-latency distribution for non-HTTP/S workloads (or for internal VMs).
- Features: Public and internal SKUs, cross-zone HA, NAT rules.
- Application Gateway
- Layer: 7 (HTTP/HTTPS)
- Use case: Web traffic routing with URL-based routing, cookie-based affinity, and WAF integration.
- Features: Web Application Firewall (WAF), SSL termination, path-based routing.
- Traffic Manager
- Layer: DNS-based routing
- Use case: Global traffic distribution using DNS for geographic routing, failover, or performance-based routing.
- Features: No direct data plane — uses DNS responses to steer clients to endpoints.
- Azure Front Door
- Layer: Global HTTP/HTTPS (edge)
- Use case: Global web application acceleration, TLS termination at the edge, dynamic site acceleration, and global load balancing.
- Features: CDN-like caching, WAF, fast failover across regions, anycast.
Comparison table
| Service | Layer | Primary use case | Key features |
|---|---|---|---|
| Azure Load Balancer | 4 (Transport) | High-throughput TCP/UDP, internal or public load balancing | Low latency, NAT rules, cross-zone HA |
| Application Gateway | 7 (Application) | HTTP/HTTPS web apps, WAF protection | URL/path-based routing, SSL offload, WAF |
| Traffic Manager | DNS routing | Global failover and geographic routing | Multiple routing methods (priority, performance, geographic) |
| Azure Front Door | Global HTTP/HTTPS edge | Global web apps, acceleration and edge features | Anycast, TLS at edge, caching, WAF |
When to pick each service
Use this decision guide to select the most suitable Azure load balancing product:-
Choose Azure Load Balancer when:
- You need high-performance Layer 4 routing (TCP/UDP).
- Your application is non-HTTP (e.g., gaming, databases, custom TCP services).
- You require an internal (private) load balancer for VNet scenarios.
-
Choose Application Gateway when:
- You need advanced Layer 7 features (URL routing, host-based routing).
- You want integrated Web Application Firewall (WAF) for OWASP protection.
- You require SSL termination and session affinity for HTTP-based services.
-
Choose Traffic Manager when:
- You need DNS-level global routing or geographic failover for multi-region deployments.
- You want to control endpoint selection by latency, priority, or geographic location.
- Your application can tolerate DNS-based routing behavior and TTL propagation.
-
Choose Azure Front Door when:
- You want global HTTP/HTTPS acceleration (edge caching and routing).
- You need fast global failover and front-door features such as TLS termination at the edge.
- Your focus is on low-latency global delivery for web applications and APIs.
Quick design tip: For many global web apps, a common pattern is to use Azure Front Door at the edge (global routing and acceleration) with regional Application Gateways behind it for WAF and path-based routing, and Azure Load Balancer for non-HTTP services or internal layer-4 traffic.
Common architecture patterns
- Internal application (microservices) within a VNet:
- Use Azure Load Balancer (internal) to distribute TCP traffic to VM Scale Sets or Kubernetes nodes.
- Public web application requiring WAF and URL routing:
- Use Application Gateway with WAF SKU; place back-end pools as VM Scale Sets, App Service Environments, or AKS Ingress.
- Global web application with low-latency requirements:
- Use Azure Front Door to direct users to the closest region and provide edge caching. Combine with regional Application Gateways for centralized WAF policies.
- Multi-region failover and geolocation-based routing:
- Use Traffic Manager to control DNS responses based on performance or geography, optionally combined with Front Door for HTTP acceleration.
Practical checklist before choosing
- Identify the traffic type: HTTP/HTTPS vs TCP/UDP.
- Determine scope: regional vs global.
- Decide on security needs: Do you need WAF?
- Consider latency and acceleration needs: edge caching, TLS at edge?
- Plan for failover: DNS-based vs application-layer health checks.
- Verify SLA and limits for the chosen SKU.
References and further reading
- Azure Load Balancer overview (Microsoft Docs)
- Azure Application Gateway overview (Microsoft Docs)
- Azure Traffic Manager overview (Microsoft Docs)
- Azure Front Door overview (Microsoft Docs)
- Kubernetes ingress options on Azure