Application Gateway, Front Door and Traffic Manager: HTTP Routing, WAF, Global Delivery and DNS-Based Routing
Comparison
| Service | Layer | Scope | Key features |
|---|---|---|---|
| Load Balancer | 4 | Regional | TCP and UDP, very fast |
| Application Gateway | 7 | Regional | URL routing, TLS offload, cookie affinity, WAF |
| Front Door | 7 | Global | Edge network, CDN caching, WAF, global failover |
| Traffic Manager | DNS | Global | DNS-based routing for any endpoint |
Application Gateway
| Part | Meaning |
|---|---|
| Frontend IP | Public or private address |
| Listener | Port, protocol and optionally host name (multi-site hosting) |
| Rule | Connects a listener to a backend pool using HTTP settings |
| Backend pool | VMs, scale sets, App Service, IPs or FQDNs |
| HTTP settings | Backend port, protocol, cookie affinity, timeouts |
| Health probe | Custom path and match conditions |
- Path-based routing:
/images/*to one pool,/api/*to another - Multi-site: several host names on one gateway
- TLS termination and end-to-end TLS, redirect HTTP to HTTPS, rewrite headers
- Use v2 SKU: autoscaling and zone redundancy. Needs a dedicated subnet
- WAF protects against SQL injection, XSS and bots. Modes: Detection and Prevention
bash
az network application-gateway create -g rg-web -n agw-web --sku WAF_v2 --capacity 2 --vnet-name vnet-app --subnet appgw \
--public-ip-address pip-agw --frontend-port 80 --http-settings-port 80 --http-settings-protocol Http --priority 100
az network application-gateway show-backend-health -g rg-web -n agw-web
Front Door
- A global entry point using Microsoft's edge network, with anycast, TLS offload, CDN caching, WAF and acceleration
- Origins and origin groups (App Service, storage, any public endpoint) with health probes and latency-based routing
- Fast failover between regions
- Use it for global web apps, then put Application Gateway behind it if you need regional layer 7 features
Traffic Manager
| Routing method | Use |
|---|---|
| Priority | Primary and backup (failover) |
| Weighted | Split traffic by percent (migration, testing) |
| Performance | Closest by latency |
| Geographic | Route by user location (data sovereignty) |
| Multivalue | Return several healthy IPs |
| Subnet | Route by client IP range |
bash
az network traffic-manager profile create -g rg-web -n tm-demo --routing-method Priority --unique-dns-name tm-demo-482
az network traffic-manager endpoint create -g rg-web --profile-name tm-demo -n primary --type externalEndpoints --target www-india.contoso.com --priority 1
az network traffic-manager endpoint create -g rg-web --profile-name tm-demo -n backup --type externalEndpoints --target www-sg.contoso.com --priority 2
Traffic Manager is DNS only It answers DNS queries with the best endpoint. The traffic does not pass through it, so it does no caching or WAF.
Choosing
| Need | Choose |
|---|---|
| TCP or UDP load balancing | Load Balancer |
| Regional web app with WAF and URL routing | Application Gateway |
| Global web app, caching, edge WAF, failover | Front Door |
| DNS failover for non-web or hybrid endpoints | Traffic Manager |
Practice
- Create an Application Gateway with two backend pools and path rules
- Turn on WAF Detection mode and review logs
- Create a Traffic Manager profile with Priority routing and test failover
- Pick a service for five scenarios
Conclusion
Use Load Balancer for layer 4, Application Gateway for regional web routing with WAF, Front Door for global web delivery and Traffic Manager for DNS-based routing.
Quick Summary: comparison; Application Gateway; Front Door; Traffic Manager; choosing.

