Cloud / Azure Front Door Interview questions
Last updated
1. What is Azure Front Door?
Azure Front Door is Microsoft's global, Layer 7 (HTTP/HTTPS) entry point for web applications. It accepts client requests at the nearest Microsoft edge location and forwards them to the best available origin over Microsoft's private backbone.
One service covers several jobs: global load balancing, TLS offload, caching, URL-based routing and web application firewall (WAF) protection. Origins can live in Azure, on-premises or in another cloud, as long as they are reachable on a public endpoint (or through Private Link in the Premium tier).
A typical use is a multi-region web app or API that needs a single global hostname, quick failover and a security layer in front.
Take quiz
Layer 7 (HTTP/HTTPS)
Layer 3 (IP routing) only
Layer 4 (TCP/UDP) only
Only Azure Storage accounts
Azure, on-premises or other clouds with a reachable endpoint
Only resources inside one Azure region
Only Azure App Service apps
2. What are the tiers of Azure Front Door?
Azure Front Door currently comes in two tiers, Standard and Premium, both generally available since March 2022. The older Classic tier is on the retirement path (March 31, 2027) and can no longer be created through the portal or CLI.
| Tier | What you get |
| Standard | Content acceleration, caching, rules engine, custom domains, WAF with custom rules |
| Premium | Everything in Standard plus managed WAF rule sets, bot protection, Private Link origins and richer security reports |
| Classic | Legacy model with frontend hosts and backend pools; migrate before retirement |
The tier is fixed per profile. You can upgrade Standard to Premium, but there is no seamless downgrade tool.
Take quiz
Classic
Standard
Premium
Every tier
June 30, 2026
March 31, 2027
It has no retirement date
December 31, 2025
3. What is an Azure Front Door profile?
A profile is the top-level container for a Front Door deployment. In Azure Resource Manager it is a Microsoft.Cdn/profiles resource, and it holds everything else: endpoints, origin groups, origins, routes, rule sets, custom domains, secrets and security policies.
The tier (Standard or Premium) is chosen when the profile is created, so every endpoint under it shares the same tier. Billing also starts here, because each profile carries a base fee on top of usage-based request and data transfer charges.
Teams usually keep one profile per application or environment, but several apps can share one profile if you want to avoid paying multiple base fees.
Take quiz
Microsoft.Network/trafficManagerProfiles
Microsoft.Network/frontDoors
Microsoft.Cdn/profiles
Microsoft.Web/sites
Separately for each route
On each custom domain
At profile creation, for all endpoints under it
Separately for each origin
4. What is an endpoint in Azure Front Door?
An endpoint is a logical grouping of routes that gets its own hostname on the Front Door domain, in the form <name>-<hash>.z01.azurefd.net. Clients can reach your app through that hostname, or through custom domains you associate with the endpoint.
The random hash is added so that a deleted endpoint name cannot be re-registered by someone else, which protects against subdomain takeover. A profile can contain multiple endpoints, and each one can have several routes pointing at different origin groups.
Take quiz
To enable caching
To prevent subdomain takeover after deletion
To encrypt traffic to the origin
To pick the nearest edge location
Routes
WAF custom rules only
Health probes only
TLS certificates only
5. What are origins and origin groups in Azure Front Door?
An origin is the actual backend that serves content, such as an App Service, a storage account, a Container App or any public host name. Each origin has a host name, ports, an optional host header, a priority (1-5), a weight (1-1000) and an enabled flag.
An origin group is a set of equivalent origins that share the same health probe and load-balancing settings. Routes point to an origin group, never directly to a single origin.
In the Classic tier these were called backends and backend pools.
Take quiz
Cache purge paths
WAF policy and rule set
Health probe and load-balancing settings
Custom domain and certificate
A health probe
A single origin
An origin group
A DNS zone
6. What is a route in Azure Front Door?
A route tells Front Door which domains and URL patterns map to which origin group. It is the glue between the front end (endpoint, custom domains) and the back end (origin group).
Key route settings:
- Domains and patterns to match, such as
/*or/api/* - Accepted protocols (HTTP, HTTPS) and the option to redirect HTTP to HTTPS
- Forwarding protocol to the origin (HTTP only, HTTPS only, or match request)
- Optional origin path, caching and compression settings
- Attached rule sets
When several routes could match, the most specific domain and path pattern wins.
Take quiz
A random one
The one with the shortest name
The one created first
The one with the most specific domain and path pattern
Health probe interval
Origin weight
Patterns to match such as /api/*
WAF managed rule set version
7. What is anycast in Azure Front Door?
Anycast means the same IP addresses are advertised from many edge locations at once. Using BGP routing, each client's traffic naturally lands on the network-closest Front Door edge instead of one fixed server.
Your DNS name resolves (through a CNAME to the endpoint) to these anycast addresses, so users in Singapore and Frankfurt get the same IP but connect to different physical locations. If one edge becomes unreachable, routing converges and clients are served from the next nearest one with no DNS change.
Take quiz
Replaces TLS encryption
Connects them to the nearest edge using one shared IP
Gives each client a dedicated IP
Routes all traffic to one primary region
The profile is deleted automatically
All traffic is dropped until manual failover
Users must update their DNS records
Routing converges and clients reach another nearby edge
8. What are edge locations in Azure Front Door?
Edge locations (points of presence) are Microsoft's globally distributed entry points where Front Door terminates client connections. Microsoft maintains a large worldwide footprint, and the current count is published in its documentation.
At the edge, Front Door performs TCP and TLS termination, WAF evaluation, rules engine processing and cache lookups. Only when the content is not cached does the request travel to the origin over Microsoft's backbone.
Each edge keeps its own cache, so the first request for an object at a given location is usually a cache miss.
Take quiz
In the client's browser
At the nearest edge location
Always at the origin server
In Azure Key Vault
Each edge location keeps its own cache
Edges only cache HTTP/3 traffic
Front Door never caches the first response
Caches are shared worldwide instantly
9. What are the routing methods in Azure Front Door?
Front Door chooses an origin using up to four mechanisms, evaluated together at the origin-group level:
| Method | How it behaves |
| Priority | Lowest priority number gets traffic; others act as standby |
| Latency | Prefers origins within the latency sensitivity window of the fastest one |
| Weighted | Splits traffic by weight (1-1000) among eligible origins |
| Session affinity | Sticks a user to the same origin using a cookie |
The default latency sensitivity is 50 ms, which means origins close to the fastest one share traffic.
Take quiz
Priority
Session affinity
Weighted
Compression
500 ms
5 ms
50 ms
5 seconds
10. What is a health probe in Azure Front Door?
A health probe is a synthetic request sent from each edge to every origin in an origin group to check whether it can take traffic. You configure the path (for example /health), protocol, request method (HEAD or GET) and interval.
A probe that returns 200 OK counts as successful. Front Door looks at recent samples and, if too few succeed, marks the origin unhealthy and stops sending user traffic to it until it recovers.
Tip: use HEAD to reduce load on the origin, and point the probe at a lightweight endpoint rather than the home page. Probing can be turned off when an origin group holds only one origin.
Take quiz
Any response at all
301 Moved Permanently
200 OK
404 Not Found
It is required for HTTPS
It bypasses the WAF
It reduces load on the origin
It encrypts the payload
11. What is caching in Azure Front Door?
Caching lets Front Door store copies of cacheable responses at the edge and serve them without contacting the origin. It is enabled per route and mainly helps static assets like images, CSS, JavaScript and downloads.
Front Door respects origin headers such as Cache-Control by default. If the origin sends no expiry, Front Door applies a default cache duration of roughly one to three days. You can override behavior with the rules engine, choose how query strings affect cache keys, and purge content when needed.
The result is lower latency for users and less load and egress at the origin.
Take quiz
Storing user session passwords
Encrypting database connections
Translating DNS names
Serving static content from the edge
On the origin's firewall
On the route
On the client's browser only
On the DNS zone
12. What is a rules engine in Azure Front Door?
The rules engine lets you change how requests and responses are handled without touching application code. You group rules into a rule set and attach it to one or more routes.
Each rule has conditions (URL path, header, cookie, client country, device type, HTTP method and more) and one or more actions:
- URL redirect and URL rewrite
- Modify request header and modify response header
- Route configuration override, such as picking a different origin group or changing cache behavior
Rules run in order, and you can stop evaluating the rest once one matches. A common use is adding security headers like Strict-Transport-Security to every response.
Take quiz
One or more routes
An origin's VM
A DNS record
A health probe
Resize the origin VM
Restart the origin server
Modify response header
Issue a database backup
13. What is Azure WAF on Azure Front Door?
Azure Web Application Firewall on Front Door inspects HTTP(S) requests at the edge and blocks malicious ones before they reach your origin. You create a WAF policy and link it to endpoints or domains through a security policy.
A policy can operate in Detection mode (log only) or Prevention mode (block). Rule types include:
- Custom rules: IP allow/deny, geo-filtering, header matches and rate limiting (both tiers)
- Managed rules: the Default Rule Set against SQL injection, XSS and similar attacks, plus Bot Manager (Premium only)
Start in Detection mode, review logs for false positives, then switch to Prevention.
Take quiz
Allow-all
Redirect
Detection
Prevention
Standard
Premium
Classic only
Neither tier
14. How do you add a custom domain to Azure Front Door?
Adding a custom domain means proving you own it, then pointing DNS at Front Door:
- Add the domain under the profile's Domains section and choose Azure-managed or your own certificate.
- Create the
_dnsauth.<subdomain>TXT record shown by Front Door to validate ownership. - Associate the domain with an endpoint and a route.
- Create a CNAME from your host name to the endpoint's
azurefd.nethostname.
For an apex domain such as example.com, a CNAME is not allowed, so use an Azure DNS alias record pointing to the Front Door endpoint.
Take quiz
An MX record
A TXT record at _dnsauth
A PTR record
An SRV record
An MX record
A reverse DNS record
Azure DNS alias record to the endpoint
A standard CNAME at the apex
15. What is the X-Azure-FDID header in Front Door?
X-Azure-FDID is a request header Front Door adds when calling your origin. Its value is the unique ID (GUID) of your Front Door profile.
Origins use it to confirm that a request really came through your Front Door. This matters because the AzureFrontDoor.Backend service tag covers every customer's Front Door, so an IP restriction alone would still let someone else's profile reach your origin.
# nginx example: reject requests that did not come through our profile if ($http_x_azure_fdid != "11111111-2222-3333-4444-555555555555") { return 403; }
Take quiz
The WAF policy version
The client's browser
Your Front Door profile
The origin's IP address
It blocks all Azure traffic
It also covers other customers' Front Door profiles
It only works for HTTP
It expires every hour
16. What is session affinity in Azure Front Door?
Session affinity routes a user's requests to the same origin for the length of the session. Front Door does this by issuing cookies named ASLBSA and ASLBSACORS when the feature is enabled on the origin group. It is off by default.
Use it only for apps that keep state in memory on the server. The cost is less even load distribution, since busy users stay pinned. If the pinned origin turns unhealthy, Front Door moves the user to another one, so state can still be lost. Stateless apps with shared session stores do not need it.
Take quiz
By disabling health probes
By pinning client IPs in DNS
By using TCP keep-alive only
With cookies such as ASLBSA
It removes WAF protection
It doubles the cache size
Load can become uneven across origins
It disables HTTPS
17. What is Private Link support in Azure Front Door Premium?
With Private Link, Front Door Premium reaches your origin through a private endpoint instead of the public internet. Traffic travels from the Front Door edge across Microsoft's backbone into a Microsoft-managed network, then connects to the origin privately.
Supported origins include Azure Storage (blob and static website), App Service and Functions, Container Apps, API Management and internal load balancers exposed through a Private Link service.
After creating the origin you must approve the pending private endpoint connection on the origin resource. Once approved, you can disable public access to the origin entirely.
Take quiz
Switch the profile to Classic
Approve the private endpoint connection on the origin
Delete the public DNS record
Disable health probes
Skip TLS completely
Remove the need for a profile
Serve content without an origin group
Turn off its public access
18. How do you enable HTTPS on a Front Door custom domain?
You pick a certificate type when adding the domain:
- Azure-managed certificate: free, issued after domain validation and renewed automatically.
- Bring your own certificate (BYOC): stored in Azure Key Vault, with Front Door's managed identity granted read access.
With BYOC, select the latest version of the secret so renewals are picked up without reconfiguring. Also set the minimum TLS version on the domain; TLS 1.2 is the sensible floor today.
Finally enable Redirect all traffic to use HTTPS on the route so plain HTTP requests never reach the origin.
Take quiz
In the client's browser
Azure Key Vault
On the origin's local disk
In the DNS zone
No minimum at all
TLS 1.0
TLS 1.2
SSL 3.0
19. What is URL redirect in Azure Front Door?
URL redirect is a rules engine action that returns a 3xx response to the client, telling the browser to request a new location. You can change the protocol, host name, path, query string and fragment.
Supported status codes are 301 (permanent), 302 (found), 307 (temporary, method preserved) and 308 (permanent, method preserved).
Common examples are sending www to the apex domain, moving an old path to a new one, or forcing HTTP to HTTPS. The browser's address bar changes because the client makes a second request.
Take quiz
200
307
302
308
Clears the DNS cache
Keeps the same URL and ignores it
Contacts the origin directly with the old URL
Sends a new request to the new location
20. What is URL rewrite in Azure Front Door?
URL rewrite changes the path sent to the origin while the client keeps seeing the original URL. It works through a source pattern and a destination path, with an option to preserve any unmatched remainder of the path.
Example: rewrite /api/v1/* to /* so an origin that does not know about the /api/v1 prefix still works.
| Redirect | Rewrite |
| Client receives a 3xx and makes a new request | Handled inside Front Door; client sees no change |
| Browser URL changes | Browser URL stays the same |
| Extra round trip | No extra round trip |
Take quiz
A certificate warning
A 301 response
A new browser tab
No change to the URL
Changing the DNS TTL
Stripping an /api/v1 prefix before the origin
Forcing HTTP to HTTPS
Blocking a country
21. What is the origin host header in Azure Front Door?
The origin host header is the Host value Front Door sends to the origin. By default it equals the origin's host name, but you can override it.
It matters for multi-tenant backends such as App Service or Azure Storage, which pick the right site or account from the Host header. If the header does not match what the origin expects, you typically see 404 errors or the default site.
Set it explicitly when your public domain (for example www.contoso.com) differs from the origin host name (for example contoso.azurewebsites.net), and make sure your app generates links correctly when the two differ.
Take quiz
They use it to select the right site
They use it to encrypt traffic
They use it as the WAF mode
They use it to choose the cache TTL
Extra WAF rules firing
404 or the origin's default page
Faster response times
Higher cache hit ratio
22. How do you purge cached content in Azure Front Door?
You purge from the portal, CLI or PowerShell by listing content paths per endpoint and domain. Three forms are allowed:
- Single file:
/images/logo.png - Folder with wildcard:
/images/* - Everything:
/*
az afd endpoint purge --resource-group rg-web --profile-name fd-prod \ --endpoint-name www --domains www.contoso.com --content-paths "/images/*"
Purges take a few minutes to propagate across edges. For frequent updates, prefer versioned file names or query strings over repeated purges.
Remember that purging removes the object only from Front Door's edge caches. Browser caches and any other CDN in front of you keep their copies until they expire, so a purge alone may not make users see the new file immediately.
Take quiz
/purge
/all.html
*.*
/*
Adding more origins
Disabling caching permanently
Using versioned file names or query strings
Shortening the DNS TTL
23. What forwarding protocols does Azure Front Door support?
The forwarding protocol on a route decides how Front Door talks to the origin. It is separate from the protocols clients use to reach Front Door.
| Setting | Behavior |
| HTTP only | Always connects to the origin on HTTP |
| HTTPS only | Always connects to the origin on HTTPS |
| Match request | Uses whatever protocol the client used |
Choose HTTPS only for end-to-end encryption. Pair it with an HTTP-to-HTTPS redirect on the route, and make sure the origin has a valid certificate that matches its host name.
Take quiz
HTTP only
HTTPS only
Match request
None of them
Always forces HTTPS
Reuses the client's protocol toward the origin
Always forces HTTP
Copies the client's IP address
24. List the key features of Azure Front Door?
The features interviewers expect you to name:
- Global load balancing with latency, priority, weighted and session-affinity options
- Anycast + split TCP acceleration over Microsoft's backbone
- Edge caching and compression
- TLS offload with managed or custom certificates
- WAF, bot protection (Premium) and rate limiting
- Rules engine for redirects, rewrites and header changes
- Private Link origins (Premium)
- Health probes with automatic failover, WebSocket support, and diagnostics through Azure Monitor
In an interview, group these into three themes: performance (anycast, caching, compression), resilience (probes, failover, routing methods) and security (WAF, TLS, Private Link). That structure is easier to remember and sounds more organised than a flat list.
Take quiz
Health probes
Custom domains
Private Link origins
Caching
DNS round robin and UDP
VPN and ExpressRoute only
Anycast and split TCP
Static IPs and NAT
25. What is compression in Azure Front Door?
Front Door can compress eligible responses at the edge using gzip or Brotli, depending on the client's Accept-Encoding header. Smaller payloads mean faster page loads and less bandwidth.
It applies to a defined list of text-based MIME types such as HTML, CSS, JavaScript and JSON, and only to files within a size range (roughly 1 KB up to 8 MB). Compression works together with caching, so enable caching on the route first.
If the origin already compresses the response, Front Door passes it through rather than compressing twice.
Take quiz
Accept-Encoding
User-Agent
Content-Type
X-Forwarded-For
Private Link
Disabled health probes
Caching on the route
Session affinity
26. What is the difference between Azure Front Door and Traffic Manager?
Both route users to healthy endpoints globally, but they work at different layers. Traffic Manager is DNS-based: it answers a DNS query with an endpoint and then steps aside. Front Door is a reverse proxy: every request flows through it.
| Aspect | Traffic Manager | Front Door |
| Layer | DNS | Layer 7 HTTP/HTTPS proxy |
| Protocols | Any (it only answers DNS) | HTTP/HTTPS and WebSocket |
| Failover speed | Bound by DNS TTL and client caching | Fast, handled per request at the edge |
| Caching, WAF, TLS offload | No | Yes |
Pick Traffic Manager for non-HTTP workloads, and Front Door for web apps and APIs.
One more difference: because Traffic Manager never sees the traffic, it cannot terminate TLS, inspect requests or cache anything. If a client keeps a resolved IP past the TTL, it may keep hitting a failed endpoint, which is exactly the gap Front Door closes.
Take quiz
It requires manual approval
It never runs health checks
DNS caching and TTL delay clients switching
It uses only one region
Front Door Standard
Azure WAF
Traffic Manager
Front Door Premium
27. What is the difference between Azure Front Door and Application Gateway?
Both are Layer 7 load balancers with WAF options, but Front Door is global and edge-based, while Application Gateway is regional and lives inside a virtual network.
| Aspect | Front Door | Application Gateway |
| Scope | Global, Microsoft edge | Single region, in your VNet |
| Caching and CDN | Yes | No |
| Backends | Public (or Private Link in Premium) | Private VNet backends and public ones |
| Best for | Multi-region failover and acceleration | Regional routing, internal apps, VNet-level control |
Many designs use both: Front Door in front for global reach, Application Gateway inside each region.
Cost and operations also differ. Front Door is a profile with request-based billing and no VNet to manage, while Application Gateway runs as capacity units you place and size per region. For a single-region internal app, Application Gateway alone is often the simpler choice.
Take quiz
Front Door Standard
Azure DNS
Traffic Manager
Application Gateway
Azure Load Balancer
Front Door
Application Gateway
VPN Gateway
28. What is the difference between Front Door Standard and Premium?
Standard covers acceleration and delivery; Premium adds the advanced security features.
| Capability | Standard | Premium |
| Caching, rules engine, custom domains | Yes | Yes |
| WAF custom rules | Yes | Yes |
| WAF managed rule sets and Bot Manager | No | Yes |
| Private Link to origins | No | Yes |
| Security reports and analytics | Basic | Enhanced |
| Price | Lower | Higher |
You can upgrade a Standard profile to Premium in place, but going back down means recreating the profile.
A practical rule: start on Standard for plain content delivery and custom WAF rules, and move to Premium the moment a security review asks for managed rule sets, bot protection or a private connection to the origin. The in-place upgrade keeps your endpoints and domains.
Take quiz
Add custom domains
Use Private Link origins
Create custom WAF rules
Use caching
Recreate the profile; there is no seamless downgrade
It happens automatically at renewal
Click a downgrade button with no downtime
Open a support ticket to flip the SKU
29. What is the difference between Front Door Classic and Standard/Premium?
Standard and Premium are a re-architected platform that merged Classic Front Door with Azure CDN capabilities. The concepts were renamed and expanded.
| Classic | Standard / Premium |
| Frontend host | Endpoint |
| Backend pool / backend | Origin group / origin |
| Routing rule | Route |
| Rules engine inside the profile | Rule sets attached to routes |
| No Private Link | Private Link (Premium) |
Classic retires on March 31, 2027. New Classic resources can no longer be created, Classic stopped supporting Azure-managed certificates from August 2025, and a built-in migration tool moves profiles across.
The practical impact for existing users is that scripts, Terraform and ARM templates written for Classic (Microsoft.Network/frontDoors) do not carry over. Standard and Premium use Microsoft.Cdn/profiles, so the migration tool handles the profile while you rewrite the automation.
Take quiz
Origin group
Rule set
Endpoint
Route
Azure Site Recovery
Azure Backup
The built-in migration capability
Traffic Manager export
30. How does Azure Front Door accelerate traffic?
Front Door speeds up dynamic content using four techniques together:
- Anycast lands the client on the nearest edge.
- Split TCP: the client's TCP and TLS handshakes finish at that nearby edge, so the round trips are short.
- The edge reuses warm, persistent connections to the origin, skipping repeated handshakes.
- Traffic crosses Microsoft's private backbone instead of the congested public internet.
Example: a user in Sydney calling an origin in West Europe completes the expensive handshakes in milliseconds with a Sydney edge, which then forwards over an already-open connection. Cached content skips the origin trip altogether.
Note that acceleration helps most for dynamic, uncacheable traffic such as API calls. For static files, caching gives the bigger win, since the origin is skipped altogether. The two work together rather than replacing each other.
Take quiz
Encrypts only half the traffic
Disables TLS between edge and origin
Splits the payload into two origins
Shortens handshake round trips by finishing them at the edge
Microsoft's private backbone
Customer VPN tunnels
A public CDN peering mesh only
Satellite links
31. How does latency-based routing work in Azure Front Door?
Front Door continuously measures probe latency from each edge to every healthy origin. It keeps the fastest origin and also any origin whose latency is within the additional latency sensitivity window (default 50 ms). Those origins form the eligible pool.
Example: the fastest origin responds in 40 ms and sensitivity is 50 ms, so any origin up to 90 ms is eligible. Traffic is then split among them by weight.
The origin group's sample size and successful samples required (commonly 4 and 3) control how many recent probes decide health. Setting sensitivity to 0 makes Front Door strictly prefer the fastest origin.
Latency is measured from the edge to the origin, not from the user to the origin. Two users in the same city therefore see the same ranking of origins, which keeps routing stable and avoids flapping between regions when a few probes are slow.
Take quiz
One responding in 120 ms
One responding in 85 ms
Only the 40 ms origin
None; sensitivity is ignored
The cache TTL
How many recent probes decide origin health
The WAF anomaly threshold
The TLS cipher order
32. How do priority and weighted routing work together in Front Door?
Front Door filters origins in layers. First priority (1-5, lowest wins) picks the group of healthy origins to use. Then latency sensitivity trims that group, and finally weight (1-1000) splits traffic proportionally among what remains.
| Origin | Priority | Weight | Receives |
| East-A | 1 | 900 | 90% of traffic |
| East-B | 1 | 100 | 10% of traffic (canary) |
| West-DR | 2 | 1000 | Nothing until both priority-1 origins are unhealthy |
This is how you do canary releases (shift weights) and active/passive disaster recovery (use priority) in the same origin group.
If you only want strict failover, give each origin a different priority and ignore weights. If you only want load sharing, keep all origins at priority 1 and tune weights. Mixing the two is what makes a canary inside an active region possible.
Take quiz
The origin with the highest weight
The priority-2 origin
The origin created last
Any origin chosen at random
Selecting the WAF mode
Splitting traffic proportionally, such as canary releases
Choosing TLS versions
Setting cache TTLs
33. How does Azure Front Door handle origin failover?
Failover is driven by health probes. Each edge probes every origin; when the number of successful samples falls below the required count, that origin is marked unhealthy and dropped from rotation. New requests go to the next best origin by priority, latency and weight.
When probes succeed again, the origin is added back automatically. No DNS change is needed, so failover typically completes within seconds to a couple of minutes depending on probe interval and sample settings.
flowchart LR
P["Edge health probes"] --> H{Origin healthy?}
H -- yes --> R["Keep in rotation"]
H -- no --> X["Remove from rotation"]
X --> N["Route to next priority or latency pool"]
N --> B["Probe keeps checking"]
B --> H
Shorter probe intervals speed detection but increase probe traffic to your origin.
Take quiz
A WAF rule update
Too few successful health probe samples
A cache purge
A DNS TTL expiring
The number of edge locations
The custom domain count
The certificate type
Probe interval and sample settings
34. Why should you restrict origin access to Front Door traffic?
If your origin stays reachable on the public internet, attackers can bypass Front Door entirely by hitting the origin's IP or default hostname. That skips your WAF rules, rate limits and geo-filtering.
Lock it down with layered controls:
- Private Link (Premium): origin has no public exposure at all.
- Service tag
AzureFrontDoor.Backendin NSG or firewall rules, instead of hard-coded IPs that change. - X-Azure-FDID header check to ensure the request came through your own profile.
The service tag and header check go together, because the tag covers all Front Door customers.
Check the result after locking down: call the origin's default hostname directly and confirm you get a 403 or a timeout, while the same request through Front Door still works. If both fail, your rule is likely blocking the Front Door service tag as well.
Take quiz
Bypassing Front Door's WAF by calling the origin directly
Larger TLS certificates
Automatic cache poisoning of other tenants
Slower DNS lookups
Front Door's IP ranges change over time
Tags remove the need for WAF
IP lists are not allowed in NSGs
Service tags are encrypted
35. How do you design a multi-region active-active setup with Azure Front Door?
The idea is one global entry point with identical stacks in two or more regions.
- Deploy the app in each region (for example App Service in East US and West Europe).
- Create one origin group with an origin per region at the same priority; use latency routing so users hit the closest region.
- Expose a /health endpoint that checks critical dependencies shallowly, and use it as the probe path.
- Replicate data with a multi-region store such as Cosmos DB or geo-replicated SQL.
- Attach WAF and enable caching for static content.
flowchart TD U[Users] --> FD["Azure Front Door"] FD --> A["Region A origin"] FD --> B["Region B origin"] A --> DB[(Replicated data)] B --> DB
Test failover regularly by disabling an origin, and keep sessions stateless so users can move between regions.
Take quiz
One origin only
Same priority with latency routing
Different priorities, one per region
Priority 5 for all
The login page with credentials
The heaviest report page
A lightweight health endpoint covering key dependencies
The static logo image only
36. How does Azure Front Door decide how long to cache content?
Cache duration follows a precedence order:
- A rules engine override if you configured one (route configuration override).
- The origin's
Cache-Control(max-age) orExpiresheader. - If neither exists, a default of about one to three days.
The cache behavior options in a rule are Honor origin, Override always and Override if origin missing. With Honor origin, responses marked private, no-cache or no-store are not cached.
Use Override always for static files whose origin sends bad headers, and avoid it for personalized pages.
When you serve personalized content, route those paths to a rule that disables caching, or make sure the origin sends Cache-Control: private. Overriding blindly can leak one user's page to another, which is the most serious mistake with edge caching.
Take quiz
Front Door applies a default of roughly one to three days
Nothing is ever cached
Content is cached for 5 seconds
Content is cached forever
Accept-Ranges: bytes
Cache-Control: no-store
Content-Language: en
Cache-Control: max-age=3600
37. How does query string behavior affect the Front Door cache hit ratio?
The query string setting decides whether URLs that differ only by query parameters share one cache entry or not.
| Behavior | Effect |
| Ignore query strings | All variants share one entry; best hit ratio |
| Use query string | Every unique URL is cached separately |
| Ignore specified query strings | Strip listed parameters, such as utm_source |
| Include specified query strings | Only listed parameters create new entries |
Example: with Use query string, /app.js?v=7 and /app.js?utm_source=x are two objects. Ignoring marketing parameters raises the hit ratio, while keeping v as a version key still allows cache busting.
If your app builds cache-busting URLs with a version parameter, keep that parameter in the key and ignore the rest. This gives you both a high hit ratio and instant updates after a deploy, without relying on purges.
Take quiz
Use query string
Ignore specified query strings
Disable caching
Session affinity
Depends on the origin's OS
Two
One
Zero
38. What is the difference between WAF custom rules and managed rules in Front Door?
Custom rules are written by you, while managed rules are maintained by Microsoft.
| Aspect | Custom rules | Managed rules |
| Authored by | You | Microsoft (Default Rule Set, Bot Manager) |
| Examples | Block a country, allow an office IP, rate limit /login | SQL injection, XSS, known bad bots |
| Tier | Standard and Premium | Premium only |
| Evaluation order | Evaluated first, by priority number | Evaluated after custom rules |
An Allow custom rule can skip managed-rule inspection for trusted traffic, so use it carefully.
Both sets can be tuned: you can add exclusions for fields that trigger false positives (for example a rich-text form field) and change individual managed rule actions, without switching off the whole rule set. Always test changes in Detection mode first.
Take quiz
Both at random
Custom rules
Bot Manager only
Managed rules
Standard
Premium
Neither
Both equally
39. How do you configure rate limiting with WAF on Azure Front Door?
Rate limiting is a custom rule of type RateLimitRule inside a WAF policy. You define:
- A threshold (requests allowed)
- A duration, either 1 or 5 minutes
- Match conditions such as path
/loginor a header - An action: block, log or redirect
Requests are counted per client IP, and counters are tracked at the edge, so enforcement is approximate rather than exact to the request.
Practical approach: start with Log, check the logs for legitimate heavy users such as shared NAT addresses, then move to Block. Apply tight limits only to sensitive endpoints like login and password reset.
Combine rate limiting with a geo-filter or IP allow rule for admin paths. For APIs behind a shared corporate proxy, many users appear as one IP, so a strict per-IP limit can block legitimate traffic. Review the logs before enforcing it.
Take quiz
10 seconds or 30 seconds
1 hour or 24 hours
1 minute or 5 minutes
Any value in milliseconds
Log
Delete the policy
Disable health probes
Block
40. Explain the request flow through Azure Front Door?
A single request passes through several stages at the edge before it ever reaches your origin:
- DNS resolves the custom domain (CNAME) to the Front Door anycast address.
- The client connects to the nearest edge; TLS terminates there.
- WAF policy inspects the request.
- The route is matched by domain and path, and the rules engine runs.
- On a cache hit, the edge responds immediately.
- On a miss, Front Door picks an origin and forwards over the backbone.
- The response passes back through response rules, may be cached, and goes to the client.
sequenceDiagram
participant C as Client
participant E as Front Door edge
participant O as Origin
C->>E: HTTPS request
E->>E: WAF, route match, rules
alt cache hit
E-->>C: cached response
else cache miss
E->>O: forward request
O-->>E: response
E-->>C: response (cached if allowed)
end
Take quiz
At the edge, before the origin
After the response is cached forever
In the client's browser
Only inside the origin app
The WAF is skipped permanently
The request is sent to every origin
DNS is re-queried
The edge answers without contacting the origin
41. How does Azure Front Door manage TLS certificates and rotation?
For Azure-managed certificates, Front Door issues the cert after domain validation and renews it automatically, as long as the DNS still points at Front Door. No action is needed.
For BYOC, the certificate lives in Key Vault and Front Door reads it using a managed identity. When the secret version is set to latest, a renewed certificate in Key Vault is picked up automatically after a propagation delay. If you pin a specific version, you must update the domain manually.
Also check that the Key Vault access policy or RBAC role for Front Door's identity is still valid; a revoked permission is a common cause of expired certificates.
For managed certificates, validation can fail if the DNS record was changed to point somewhere else, for example to another CDN. Keep the CNAME (or alias record) pointing at the Front Door endpoint, and renewal will keep working without anyone touching it.
Take quiz
It removes the need for Key Vault
It moves the cert to the origin
It disables TLS
Renewed certificates are picked up automatically
A longer probe interval
Too many routes
Front Door's identity losing access to Key Vault
The cache hit ratio dropping
42. What happens when all origins in a Front Door origin group are unhealthy?
Front Door does not stop serving. When every origin in the group appears unhealthy, it treats them all as healthy again and sends requests anyway, spreading them across the origins.
The reasoning is that a probe failure may be wrong or temporary (for example a bad probe path), and refusing all traffic would turn a partial problem into a full outage.
In practice, users then see whatever the origin returns: real content if it recovered, or errors such as 502, 503 or 504 if it is truly down. To avoid false alarms, monitor the Origin Health Percentage metric and alert before it hits zero.
Probe design affects this behavior directly. A probe path that depends on a database can mark every origin unhealthy during a database blip, even though static pages still work. Keep probe endpoints light and focused on whether the origin can accept traffic.
Take quiz
Redirects users to Traffic Manager
Shuts down the profile
Returns a cached page forever
Treats them as healthy and keeps sending requests
Origin Health Percentage
Total Latency
WAF Request Count
Byte Hit Ratio
43. How do you troubleshoot 502 Bad Gateway errors in Azure Front Door?
A 502 means Front Door could not get a valid response from the origin. Work through the common causes:
- TLS problems: the origin certificate is expired, self-signed, from an untrusted CA or does not match the origin host name.
- Protocol or port mismatch: forwarding protocol is HTTPS only but the origin only listens on HTTP.
- Firewall or NSG blocking the
AzureFrontDoor.Backendservice tag. - Host header sent to the origin that it rejects or resets.
- The origin closing the connection or crashing mid-response.
Test the origin directly with curl -v using the same host header, then check the access log (originName, httpStatusCode) and quote the X-Azure-Ref value when opening a support case.
Also look for a mismatch between the SNI or host header Front Door sends and what the origin's certificate covers. Setting the origin host header to the name on the certificate is a very common fix for this specific 502.
Take quiz
A longer DNS TTL
An origin certificate that does not match the host name
A purged cache
A new custom domain
X-Azure-Ref
X-Forwarded-Proto
Accept-Language
ETag
44. How do you troubleshoot 504 Gateway Timeout errors in Front Door?
A 504 means Front Door waited for the origin but the origin did not answer within the origin response timeout. The default is 60 seconds and it can be raised (up to 240 seconds), but raising it is a last resort.
- Measure how long the slow request takes directly against the origin.
- Check origin CPU, memory, database calls and cold starts.
- Move long jobs to an async pattern: return 202 and let the client poll.
- Raise the timeout only for routes that truly need it.
- Confirm the app is not holding connections open for streaming that Front Door treats as idle.
Compare the access log's origin timing fields against the Total Latency metric to see where the time goes.
Take quiz
The certificate expired at the edge
The DNS record is missing
The origin did not respond within the timeout
The WAF blocked the request
Disable TLS
Use an async pattern for long-running work
Add more custom domains
Remove health probes
45. How do you troubleshoot cache misses in Azure Front Door?
Start by reading the X-Cache response header, which tells you what the edge did:
| X-Cache value | Meaning |
| TCP_HIT | Served from the edge cache |
| TCP_REMOTE_HIT | Served from a regional cache layer |
| TCP_MISS | Fetched from the origin |
| CONFIG_NOCACHE | Caching is off on the route |
| PRIVATE_NOSTORE | Origin headers forbid caching |
If you see misses, check: caching enabled on the route, origin Cache-Control headers, query string variations creating separate entries, non-GET methods, a recent purge, and the fact that each edge fills its own cache on first request.
For testing, request the same URL twice from the same location. The first response is usually a miss and the second a hit. If the second is still a miss, look at the response headers from the origin, because that is where the cause almost always sits.
Take quiz
CONFIG_NOCACHE
PRIVATE_NOSTORE
TCP_REMOTE_HIT
TCP_HIT
They force HTTP/1.0
They remove the WAF
They disable compression
Each unique URL becomes its own cache entry
46. When should you use Azure Front Door together with Application Gateway?
Use both when you need global entry plus regional control. Front Door handles global routing, acceleration, caching and edge WAF. Application Gateway sits inside each region's VNet for path routing to private backends, internal-only services or mutual TLS inside the network.
Design points:
- Restrict Application Gateway's public IP to the
AzureFrontDoor.Backendtag and checkX-Azure-FDID. - Decide which layer owns the WAF to avoid double inspection and duplicate false positives.
- Preserve the client IP through
X-Forwarded-For. - Expect added latency and cost, so skip the combination if Front Door alone fits.
If you do not need VNet-level path routing, internal-only backends or regional mTLS, skip Application Gateway. Front Door Premium with Private Link can often reach the private app directly, and removing a hop reduces both latency and cost.
Take quiz
Global DNS routing only
Regional routing to private VNet backends
Removing TLS completely
Replacing the CDN cache
Which layer owns the WAF
Which TLS port to use
Which DNS provider to use
Which VM size to use
47. How do you migrate Azure Front Door Classic to Standard or Premium?
Microsoft provides an in-portal migration that creates a new Standard or Premium profile from your Classic configuration with no downtime.
- Validate: the tool checks compatibility and flags unsupported items.
- Prepare: it builds the new profile; review the mapping of routes, origin groups, rules and WAF.
- Enable managed identity if you use BYOC certificates from Key Vault.
- Migrate: traffic switches to the new profile.
Choose Premium if you need managed WAF rules or Private Link. Plan ahead: Classic retires March 31, 2027, and the profile name carries over. Also update any IaC and automation, since Standard/Premium use different APIs and CLI commands (az afd).
After the cut-over, verify DNS still points to the endpoint, test HTTPS on every custom domain, and review WAF policies that were converted. Keep the old configuration documented until you are confident, since you cannot simply roll the migration back.
Take quiz
Enable managed identity for BYOC certificates
Purge cache
Delete the Classic profile first
Recreate DNS zones
Only the browser bookmarks
The origin's operating system
Nothing; scripts are identical
IaC and CLI automation (az afd commands)
48. How can you optimize Azure Front Door costs?
Front Door billing combines a base fee per profile, request charges and data transfer out from the edge, so the savings come from doing less work at the origin and fewer profiles.
- Enable caching and compression so fewer bytes leave the edge and the origin.
- Ignore irrelevant query strings to raise the hit ratio.
- Use Standard unless you need managed WAF, bot protection or Private Link.
- Consolidate small apps into fewer profiles to avoid multiple base fees.
- Use Azure Cost Management to find which endpoints drive request and egress charges.
- Block abusive traffic at the WAF so you do not pay to serve it.
Check current pricing for how traffic from Azure origins to the edge is billed.
Be careful with one trade-off: aggressive caching reduces cost but risks serving stale or personalized content. Measure the Byte Hit Ratio metric before and after each change so you can show the saving rather than guess it.
Take quiz
Disabling compression
Lowering the cache TTL
Improving the cache hit ratio
Adding more profiles
When you need Private Link
Never; Premium is mandatory
When you need bot protection
When you do not need managed WAF, bot protection or Private Link
49. How do you monitor Azure Front Door with logs and metrics?
Use Azure Monitor with diagnostic settings sent to Log Analytics.
| Source | Examples |
| Logs | FrontDoorAccessLog, FrontDoorHealthProbeLog, FrontDoorWebApplicationFirewallLog |
| Metrics | Request Count, Total Latency, Origin Health Percentage, 4XX/5XX ratio, Byte Hit Ratio, WAF Request Count |
AzureDiagnostics | where Category == "FrontDoorAccessLog" | where toint(httpStatusCode_s) >= 500 | summarize errors = count() by originName_s, bin(TimeGenerated, 5m)
Add alerts on Origin Health Percentage and 5XX rate, and use WAF logs to tune rules before moving from Detection to Prevention.
Retention matters too: Log Analytics ingestion is billed, so sample or filter noisy access logs if volume is high, and consider archiving to a storage account for long-term audit needs. Dashboards in Azure Monitor workbooks make these numbers easy to share with the team.
Take quiz
Cache TTL
Request Size
Origin Health Percentage
Byte Hit Ratio
AuditLog
ActivityLog only
FrontDoorWebApplicationFirewallLog
FrontDoorHealthProbeLog
50. How do you deploy Azure Front Door using Azure CLI?
Standard and Premium use the az afd command group. Build the pieces in dependency order: profile, endpoint, origin group, origin, route.
az afd profile create -g rg-web --profile-name fd-prod --sku Premium_AzureFrontDoor az afd endpoint create -g rg-web --profile-name fd-prod --endpoint-name www --enabled-state Enabled az afd origin-group create -g rg-web --profile-name fd-prod --origin-group-name og-app \ --probe-request-type HEAD --probe-protocol Https --probe-path /health \ --probe-interval-in-seconds 60 --sample-size 4 --successful-samples-required 3 \ --additional-latency-in-milliseconds 50 az afd origin create -g rg-web --profile-name fd-prod --origin-group-name og-app \ --origin-name app1 --host-name app1.azurewebsites.net \ --origin-host-header app1.azurewebsites.net --priority 1 --weight 1000 --enabled-state Enabled az afd route create -g rg-web --profile-name fd-prod --endpoint-name www --route-name r1 \ --origin-group og-app --supported-protocols Http Https --https-redirect Enabled \ --forwarding-protocol HttpsOnly --link-to-default-domain Enabled --patterns-to-match "/*"
For repeatable infrastructure, the same objects exist in Bicep and Terraform under Microsoft.Cdn/profiles.