Skip to main content
emnode
Site Reliability

Give Front Door multiple origins for failover

One reliability capability: make sure every Azure Front Door origin group has more than one origin, so that when a single backend goes down, traffic shifts to a healthy one instead of the whole site going dark.

13 min·10 sections·AZURE

Last reviewed

Multiple origins for Front Door: the basics

What does a single-origin Front Door actually look like when the backend fails?

Azure Front Door is the global front end for a web application: every request from your users lands on a Front Door edge location and is forwarded to an origin, the actual backend that serves the content. An origin group is the set of origins Front Door can choose from for a given route, and Front Door health-probes each one and load-balances between them. The reliability question is simple: how many origins are in that group? If the answer is one, then Front Door has nowhere to send traffic the moment that single backend becomes unavailable, and the global front end you paid for cannot do the one thing it is best placed to do, which is route around a failure.

Azure Advisor surfaces this directly. The reliability recommendation 'Consider having at least two origins' flags any Front Door profile whose origin group has a single origin. Microsoft's own words: multiple origins support redundancy by distributing traffic across multiple instances of the application, so that if one instance is unavailable, other backend origins can still receive traffic. Advisor rates the impact as High and files it under the HighAvailability subcategory, because a single origin is a single point of failure sitting behind an otherwise highly available service.

Most single-origin setups are not a decision, they are a starting point nobody revisited. A team stands up Front Door in front of one App Service or one storage static site to get TLS, caching and a clean custom domain, ships it, and moves on. The origin group quietly stays at one. The work in this lesson is to find every Front Door origin group with a single origin, add a second origin (a paired-region backend, a standby slot, or a second instance), set priorities so one is primary and the other is the failover, and let Front Door's health probes handle the cutover automatically.

In this lesson you will learn how Azure Front Door uses origin groups, origins, priorities and health probes to route around a failed backend, why a single-origin group is a single point of failure that Advisor flags as High impact, and how to add a second origin and prove the failover works without taking the live service down. The focus throughout is downtime risk: what an outage actually costs versus what resilience costs.

Fun fact

The highly available front end with one place to go

It is a common surprise that a service explicitly designed for high availability, with a global anycast network and dozens of points of presence, can still be brought down by one backend. Front Door's edge has well over a hundred locations worldwide and almost never fails as a whole. The single point of failure is not Front Door, it is the origin group with one origin in it. Front Door will keep accepting requests from every corner of the planet and then have exactly one backend to forward them to. The resilience you are buying from the edge is only as deep as the number of healthy origins it can choose from.

Finding single-origin Front Doors across a subscription

Priya runs platform engineering at a SaaS company that put several apps behind Azure Front Door over the past two years to get managed TLS and a global edge. Azure Advisor is now showing 'Consider having at least two origins' against three of those profiles.

Before changing anything, Priya wants to see which origin groups actually have a single origin and which service sits behind each, so the customer-facing ones can be prioritised over the internal tooling.

List the origins in an origin group. A group that returns a single origin is the one Advisor is flagging.

$ az afd origin list --resource-group rg-edge --profile-name fd-shop --origin-group-name og-shop --query "[].{name:name, host:hostName, priority:priority, enabled:enabledState}" -o table
Name Host Priority Enabled
---------- --------------------------- ---------- --------
shop-eastus shop-eastus.azurewebsites.net 1 Enabled
# Only one origin in og-shop. A failure here has nowhere to go: full outage.

A single-origin group is the whole risk in one line. The next step is to add a second origin and set priorities so one is primary and the other is failover.

How Front Door routes around a failed origindeep dive

Front Door continuously sends health probes to every enabled origin in an origin group. The origin group's load-balancing settings define how those probes are read: a sample size and a number of successful samples required mean an origin is only marked unhealthy after it fails several consecutive probes, which avoids flapping on a single blip. When an origin is judged unhealthy, Front Door stops sending it traffic and uses the remaining healthy origins instead. With only one origin in the group, there is no remaining healthy origin, so there is nothing for the probe result to do: the failure becomes a full outage.

Failover behaviour is driven by each origin's priority, a value from 1 to 5 where a lower number means higher priority. Front Door routes to the healthy origins with the lowest priority value; if all of those become unavailable, it moves to the next priority level. So a primary origin at priority 1 and a standby at priority 2 gives you active-passive failover: all traffic goes to the primary while it is healthy, and the instant it fails its probes, Front Door shifts to the priority-2 standby with no configuration change. Setting both origins to the same priority instead gives you active-active, with weight controlling the traffic split.

The cutover is not instant to the millisecond, and that is deliberate. The detection time depends on the probe interval and the successful-sample threshold you configure: a shorter interval fails over faster but probes the backends harder. The point is that the cutover is automatic and bounded in seconds to a couple of minutes, rather than open-ended and dependent on a human noticing. Adding the second origin is what turns the health probe from a passive status light into an actual failover mechanism.

What is the impact of leaving Front Door on a single origin?

The direct impact is unmitigated downtime. A single-origin Front Door has no failover, so any event that takes the one backend offline, a bad deployment, a regional incident, a dependency failure, a resource exhaustion, takes the whole service offline with it. The global edge keeps answering and has exactly one place to forward to, and that place is down. Recovery depends entirely on a person detecting the problem and fixing or repointing the origin, which turns a seconds-long automatic cutover into a minutes-or-hours manual incident.

The second-order impact is that it concentrates risk on your single busiest moment. Backends fail most often under load and during change, which is precisely when an outage costs the most: peak traffic, a launch, a sale. A single origin means your reliability is only as good as that one backend's worst day, and you have given up the one tool, automatic global failover, that the front end was meant to provide.

On the assurance side, resilience reviews, customer due-diligence questionnaires and availability commitments increasingly ask whether internet-facing services survive the loss of a single component. 'Every customer-facing Front Door has at least two origins with automatic failover' is a clean, demonstrable answer. A single-origin profile is the opposite: a documented single point of failure sitting in front of the services you most need to keep up.

How do you add failover safely?

Work the capability as one loop rather than chasing each finding in isolation. The order matters: stand up and verify the second origin before you rely on it, so the failover path is proven and the change never risks the origin that is currently serving traffic.

1. Inventory every single-origin origin group

For each Front Door profile, list the origins in every origin group and find the ones with a single origin. Map each to the service behind it and what an hour of its downtime costs. Treat that downtime cost, not the raw finding count, as the source of truth for ordering the work.

2. Choose the second origin per service

Decide what the failover target is for each service: a standby instance in a paired Azure region, a second App Service or App Service slot, or an existing second instance you already run. A passive standby can be sized small. The only requirement is that it can serve the same content and answer the same health probe path as the primary.

3. Add the origin and set priorities for active-passive

Add the second origin to the same origin group. Set the primary to priority 1 and the standby to priority 2 so all traffic stays on the primary until it fails its probes, then shifts automatically to the standby. Give both origins the correct origin host header so the backend accepts the request.

4. Prove the failover, then bake it into deployment

Verify the cutover before trusting it: take the primary out of service in a controlled test and confirm traffic moves to the standby. Then put the two-origin pattern into the Bicep or template that provisions every new Front Door, so resilience is the default rather than something added after Advisor flags it.

# Add a second origin as the priority-2 failover target in an existing origin group.
# Front Door does not charge per origin; the cost is the standby backend itself.
az afd origin create \
  --resource-group rg-edge \
  --profile-name fd-shop \
  --origin-group-name og-shop \
  --origin-name shop-westus \
  --host-name shop-westus.azurewebsites.net \
  --origin-host-header shop-westus.azurewebsites.net \
  --priority 2 \
  --weight 1000 \
  --enabled-state Enabled \
  --https-port 443 \
  --http-port 80

# Make sure the existing primary is priority 1 so it stays the active origin.
az afd origin update \
  --resource-group rg-edge \
  --profile-name fd-shop \
  --origin-group-name og-shop \
  --origin-name shop-eastus \
  --priority 1

# Bake the two-origin pattern into the template so resilience is the default.
# Bicep: a priority-2 standby alongside the priority-1 primary in the same group.
#
# resource standby 'Microsoft.Cdn/profiles/originGroups/origins@2025-12-01' = {
#   parent: originGroup
#   name: 'shop-westus'
#   properties: {
#     hostName: 'shop-westus.azurewebsites.net'
#     originHostHeader: 'shop-westus.azurewebsites.net'
#     httpPort: 80
#     httpsPort: 443
#     priority: 2
#     weight: 1000
#     enabledState: 'Enabled'
#     enforceCertificateNameCheck: true
#   }
# }

Quick quiz

Question 1 of 5

Azure Advisor raises 'Consider having at least two origins' against a Front Door profile. What is it actually telling you?

You can now treat Front Door failover as one reliability capability rather than a scatter of findings: inventory every single-origin origin group, map each to what its downtime costs, add a standby origin at priority 2 behind a priority-1 primary, prove the cutover in a controlled test, and bake the two-origin pattern into your templates so resilience is the default. The single point of failure was never Front Door's edge, it was the origin group with one origin in it.

Back to the library