What is Azure Front Door?
Azure Front Door is a global, scalable entry point for web applications. It uses Microsoft's global anycast network — with over 100 edge locations worldwide — to bring your application close to users everywhere. Key capabilities:
- Global HTTP/HTTPS load balancing — Route to the best backend globally
- CDN caching — Cache content at edge locations near users
- SSL offloading — Terminate SSL/TLS at the edge
- WAF — Protect against web attacks at the global edge
- URL routing — Path and hostname-based routing
- Instant failover — Automatically routes around failed backends
Front Door Tiers
| Tier | Key Features | Best For |
|---|---|---|
| Standard | CDN, custom domains, SSL, URL routing, health probes | Static content delivery, simple load balancing |
| Premium | Standard + WAF, Private Link integration, advanced security, bot protection | Enterprise web apps, security-sensitive applications |
How Front Door Works
When a user requests your website:
- DNS resolves your domain to a Front Door anycast IP
- The request is routed to the nearest Front Door edge PoP
- Front Door checks if the response is cached — if so, returns it immediately
- If not cached, Front Door selects the best backend (lowest latency, healthiest) and proxies the request
- The response is cached at the edge for future requests
- Front Door returns the response to the user
Because Front Door terminates the connection at the edge (near the user) and maintains a persistent warm connection to the backend, round-trip latency for users worldwide is dramatically reduced.
Routing Methods
Front Door can route traffic across origins (backends) using different methods:
| Method | How It Works | Use When |
|---|---|---|
| Latency (default) | Route to the backend with lowest latency from the edge PoP | Best performance for users |
| Priority | Route to primary backend; failover to secondary if primary fails | Active-passive failover |
| Weighted | Distribute traffic by weight (e.g., 80% to prod, 20% to canary) | Canary releases, blue-green deployments |
| Session affinity | Same user always goes to same backend | Stateful applications |
CDN Caching
Front Door caches static content (images, CSS, JS, HTML) at edge locations. Subsequent requests for the same content are served from the cache — no round-trip to your origin needed.
Caching Rules
- Configure cache duration per route
- Cache based on query strings
- Purge specific paths or all cached content when needed
Cache Hit Ratio
Monitor your cache hit ratio in Front Door metrics. A high cache hit ratio (80%+) means most requests are served from cache — reducing origin load and improving latency.
WAF Integration
Front Door Premium includes a Web Application Firewall at the global edge — protecting all your origins simultaneously. The WAF runs at the edge before traffic reaches your backends — blocking attacks without them ever reaching your servers.
WAF Policy
A WAF policy defines managed rule sets (OWASP) and custom rules. The same WAF policy can be shared across multiple Front Door endpoints — centralised security management.
Health Probes and Failover
Front Door continuously probes origin health. When an origin fails health checks:
- Front Door detects the failure within ~30 seconds
- Stops routing new requests to the failed origin
- Continues routing to healthy origins
- Automatically resumes routing to the origin when it recovers
This gives you automatic multi-region failover — if your primary region goes down, Front Door routes to your secondary region automatically, with near-zero downtime for users.
Custom Domains and HTTPS
Front Door provides free managed SSL certificates for custom domains. Setup:
- Add your custom domain to Front Door
- Create a CNAME in your DNS:
www.contoso.com → contoso.azurefd.net - Enable HTTPS — Front Door provisions a managed certificate automatically
- Front Door renews the certificate before expiry
Front Door vs Traffic Manager vs App Gateway
| Feature | Front Door | Traffic Manager | App Gateway |
|---|---|---|---|
| OSI Layer | Layer 7 | DNS (Layer 3/4) | Layer 7 |
| Scope | Global | Global | Regional |
| Protocol | HTTP/HTTPS | Any | HTTP/HTTPS |
| CDN | ✅ Yes | ❌ No | ❌ No |
| SSL termination | ✅ Yes | ❌ No | ✅ Yes |
| WAF | ✅ Yes (Premium) | ❌ No | ✅ Yes (WAF SKU) |
| URL routing | ✅ Yes | ❌ No | ✅ Yes |
| Failover speed | Fast (~seconds) | Slow (~DNS TTL) | Fast |