Skip to main content

Azure Front Door

Azure Front Door is a global Layer 7 entry point that routes users to the nearest healthy backend across regions. It adds TLS offload, CDN-style caching, and a Web Application Firewall at Microsoft's edge.

Azure Front Door

Front Door terminates user connections at Microsoft's global edge network and forwards requests over the Microsoft backbone to the closest healthy origin. Health probes detect a failed region and shift traffic automatically. It comes in Standard and Premium tiers, and Premium adds managed WAF rule sets, bot protection, and Private Link connections to origins.

How Is Front Door Different From Application Gateway and Traffic Manager?

  • Front Door: Global, edge-based, HTTP and HTTPS, with caching and WAF.
  • Application Gateway: Regional Layer 7 load balancing and WAF inside one region.
  • Traffic Manager: DNS-based routing only, with no proxying, caching, or WAF.

Large designs often use Front Door globally in front of regional Application Gateways.

flowchart TD U(["Global users"]):::person -->|nearest edge| F["Azure Front Door
WAF and cache"]:::tool F -->|health probe ok| R1["Central India
origin"]:::cloud F -->|failover| R2["South India
origin"]:::cloud classDef person fill:#EDE9FE,color:#1E293B classDef tool fill:#326CE5,color:#FFFFFF classDef cloud fill:#D1FAE5,color:#1E293B

How Do You Create a Front Door Profile?

Bash
az afd profile create --profile-name mumbai-frontdoor \
--resource-group mumbai-prod-rg --sku Premium_AzureFrontDoor
az afd endpoint create --profile-name mumbai-frontdoor \
--resource-group mumbai-prod-rg --endpoint-name streaming-global \
--enabled-state Enabled

Why It Matters in Production

A streaming service like Hotstar or Spotify needs users on several continents to hit a nearby edge and survive the loss of a region without a DNS change. Front Door provides both with one configuration.

Common Mistake

Caching dynamic or personalised responses at the edge. Exclude authenticated and user-specific paths, or one user can receive another user's response.

Security

Lock origins to Front Door by allowing only the AzureFrontDoor.Backend service tag and checking the X-Azure-FDID header, or users can bypass the WAF by calling the origin directly.

Frequently Asked Questions

Should I use Front Door or Traffic Manager?

Use Front Door when you need HTTP routing, caching, WAF, or fast failover. Traffic Manager is a simpler DNS-only option and also supports non-HTTP protocols.

Why does Front Door keep sending traffic to a failed region?

Health probes are usually misconfigured, for example probing a path that always returns 200 or one that needs authentication. Probe a real health endpoint and tune the interval.

Does Front Door replace a CDN?

For many workloads, yes. It includes edge caching for static content, though dedicated CDN features such as rule-based cache tuning may differ by tier.

Found a mistake, an outdated step or a broken link?