Skip to content
CAMPUX Cloud Bootcamp Phase Two · Class Thirteen
Phase Two — Core Infrastructure
4 drills · 2 situations · Part II of II
Load Balancing & Traffic
Class Thirteen · Part II

Front Door & Health Probes

Part I sorted the two regional doors. This half opens the global one — Front Door, standing in the request path itself at Microsoft's edge — and ends on the single most commonly misconfigured piece of the whole topic: a health probe that has to tell the truth.

Phase Two · Core Infrastructure · Class 13 · Part B · 19 min · Assumes Class 13 Part A and Class 11 Part B

After this you can explain when Front Door can switch between independent origins, and design health checks that reflect real readiness.

New to this? Read Class 13 Part A and Class 11 Part B first. Already done them, or know the material? Carry on.

§1

Front Door: the global front door

Front Door is an option when a public HTTP site needs an entry point at Microsoft's global edge. It receives the request, chooses an origin according to your configuration and origin health, and forwards the request. With the right route and policy, it can also cache public static assets and apply a web application firewall (WAF). None of those settings creates a second working region for you.

Picture a shop with origins in West Europe and North Europe. If West Europe fails, Front Door can send new requests to North Europe after it detects the failure, provided North Europe and its dependencies can actually serve them. Requests already in flight may fail. Caching can help images and scripts, but leave personalized pages, carts and checkout uncached. A WAF policy must be configured and associated with the route you intend to protect.1

The distinction from Traffic Manager is the one interviews probe, so hold it precisely. Front Door is in the data path: traffic flows through it, so it can cache, inspect and route on content. Traffic Manager works at DNS: it answers the question "which address should this name resolve to" and then steps out of the way — it never sees the traffic, cannot cache, cannot inspect.2 Traffic Manager is the motorway sign; Front Door is the entrance you actually walk through. Choose Traffic Manager when you need DNS-level direction across endpoints of any protocol; choose Front Door when you want a global HTTP front door that does real work on the request.

Traffic Manager's four ways to choose an endpoint

When you do reach for Traffic Manager — steering across regions, or across services Front Door does not front — the next question is which endpoint its DNS answer should name. That is set by the routing method, and choosing the wrong one is how a design that looks highly available quietly sends every user to a single region anyway. Four are worth committing to memory.

Table 1 — Traffic Manager routing methods
MethodAnswers withReach for it when
PriorityThe highest-priority endpoint that is healthy; the rest wait as cold standbyActive-passive failover — one primary region, others held in reserve
WeightedAn endpoint chosen in proportion to weights you assignGradual rollouts; DNS caching means observed user percentages can differ
PerformanceAn endpoint selected using Azure's network-latency map for the DNS resolver or client subnetSteer traffic toward a low-latency endpoint; test from real client networks
GeographicAn endpoint mapped from the inferred location of the DNS resolver or client subnetBroad regional steering; verify location and enforce residency in the application and data design

Two more methods exist: Subnet maps source-IP ranges to endpoints, and MultiValue returns several healthy addresses. Performance and Geographic make different DNS decisions, but neither identifies every end user with certainty. A resolver may be elsewhere, and client-subnet location can be wrong. If EU residency is mandatory, enforce it with application routing, authorization and data placement; do not treat a DNS answer as a compliance boundary.4

Figure — Beside the path, or in it
Traffic Manager — beside the path Front Door — in the path Client Traffic Manager answers DNS only 1 · name? 2 · "region A's address" Storefront region A 3 · the traffic, direct Client Front Door edge · optional cache + WAF Storefront configured healthy origin every request cached, or forwarded never passes through the sign
Traffic Manager answers DNS and steps aside; Front Door remains in the HTTP request path. That lets a configured cache or WAF act on requests. Switching origins avoids waiting for a client DNS cache, but still needs detection time and a healthy alternative.
§2

Health probes: the part everyone gets wrong

Health probes help a traffic service choose among backends. They do not create a working alternative. Front Door keeps routing to a single origin even if its probe reports unhealthy; if every origin in a group is unhealthy, it still tries them. To survive a regional outage, you need another healthy origin with independent capacity and critical dependencies.5

Health probe
A periodic request the load balancer makes to each backend to decide whether it is fit to receive traffic. Its worth depends entirely on whether the thing it checks reflects the thing that matters.

A probe that always says healthy is blind.

Here is the classic failure. A probe is pointed at the site's home page, or a bare / that returns a static "200 OK" no matter what — and it dutifully reports every instance healthy even while the application behind it cannot reach its database and is failing every real order. The load balancer, seeing green, keeps routing customers to a broken machine. The probe was answering "is the web server process running?" when the question that mattered was "can this instance actually serve a request?"

Use a dedicated readiness endpoint that checks whether this origin can serve its core requests. Keep it cheap and bounded: a probe from many edge locations should not run an expensive database query on every visit. Check local critical dependencies when practical, and monitor shared dependencies separately. Set thresholds so a short blip does not eject a healthy origin. Test the failure path with two working origins; if both depend on the same failed database, a red probe cannot make checkout available.

Table 2 — The decision, on one page
ServiceScopeLayerReach for it when
Load BalancerRegionalL4 (TCP/UDP)Spreading raw connections across VMs in a region
Application GatewayRegionalL7 (HTTP)In-region web routing and a WAF, inside the VNet
Front DoorGlobalL7 (HTTP)A global public website: edge caching, routing, WAF
Traffic ManagerGlobalDNSDNS-level direction across endpoints, any protocol

Walking the decision, in order

Table 2 and the tree narrow the options; they are not an automatic purchase order. First ask whether you need HTTP features such as path routing or a WAF. For raw TCP/UDP across regional VMs, consider Load Balancer. For regional HTTP routing near private backends, consider Application Gateway. For a public HTTP site with a justified global edge, evaluate Front Door. For DNS-level steering across endpoints or protocols, consider Traffic Manager. Then ask whether an existing service already meets the need, what failure you must survive, and what the added service costs. A global audience alone does not require Front Door.

Figure — The decision, as a tree
A workload needs routing start with protocol and scope Route or inspect by what the request says? · path · host · WAF raw, regional Azure Load Balancer Layer 4 · regional · the turnstile yes Would a global HTTP edge solve a measured need? regional Application Gateway L7 · regional · in-VNet yes Front Door L7 · global · optional cache/WAF Traffic Manager DNS · across regions DNS steering is a separate question
This sketch identifies candidates, not a mandatory stack. Confirm the protocol, existing service, recovery design and cost before adding one. Traffic Manager is a separate DNS-steering option.
Case File · Campux Retail

Campux's front door, and its side door

Front Door for the storefront · Application Gateway for the admin app

The public storefront is a candidate for Front Door if measurements justify a global edge. Cache versioned public images and scripts; keep carts, accounts and checkout uncached. Apply a WAF policy if needed and test its rules. A second region would need its own working origin and critical dependencies before the design could claim regional failover.

The internal admin application — used only by staff, never by the public — keeps the Application Gateway with WAF from Part I, inside the VNet. It needs Layer 7 routing and a firewall, but not a global edge; a regional gateway close to its backends is the honest fit, and keeping it internal is part of its security.3 Campux uses no Traffic Manager: it runs in a single region, so there are no cross-region endpoints for a DNS-level director to choose between — a service not used on purpose, which is its own kind of design decision.

Use readiness checks that match each routing layer. A regional gateway may remove a failed VM while Front Door judges the regional origin as a whole. With one Front Door origin, a probe cannot redirect traffic elsewhere. Next class removes the public door from the parts that should never have had one.

Play

Play it through

Match each service to its job. Then see how a global HTTP entry selects a second working origin after an outage, while a regional gateway checks the VMs behind it. The simulation stops when it needs your hands.

Lab 1 · Azure CLI

Put a global front door on a site the CLI way

~45 minutes, most of it waiting for the edge · Azure Cloud Shell · the origin app is supplied below · Front Door bills a base fee by the hour, so delete it the same sitting

First stand up a tiny origin you control, with a real /health route, and check its answer. Then build one Front Door profile, endpoint, origin group, origin and route in front of it. This one-origin lab teaches configuration and probe inspection; it does not provide failover. Use a working /health endpoint that returns a non-success status when this origin cannot serve core requests. For production with one origin, disable unnecessary Front Door health probes; add a tested, independent second origin before claiming regional recovery.

  1. Open Cloud Shell — the >_ icon in the top bar — and choose Bash. Set the origin host you will front:

    export MSYS_NO_PATHCONV=1   # Git Bash on Windows only; harmless elsewhere
    FD_RG="rg-campux-fd-$RANDOM"
    FD_ENDPOINT="campux$(date +%s)$RANDOM"
    APP="campux-origin-$RANDOM"
    LOC=centralus               # where the origin app runs; Front Door itself is global
    az group create --name "$FD_RG" --location "$LOC"
  2. Write the origin app: twelve lines of Node.js. The home page answers with a heading; /health answers 200 ok. In a real shop the health route would also check the database; here it only proves the process is up.

    mkdir -p fd-origin && cd fd-origin
    cat > index.js <<'EOF'
    const http = require('http');
    http.createServer((req, res) => {
      if (req.url === '/health') {
        res.writeHead(200, { 'Content-Type': 'text/plain' });
        return res.end('ok');
      }
      res.writeHead(200, { 'Content-Type': 'text/html' });
      res.end('<h1>Campux storefront</h1>');
    }).listen(process.env.PORT || 8080);
    EOF
    cat > package.json <<'EOF'
    { "name": "fd-origin", "version": "1.0.0", "scripts": { "start": "node index.js" } }
    EOF
  3. Deploy it to a free App Service plan and check the origin before Front Door exists. Predict the two lines first.

    az webapp up --name "$APP" --resource-group "$FD_RG" \
      --runtime "NODE:22-lts" --sku F1 --location "$LOC"
    ORIGIN="$APP.azurewebsites.net"
    curl -s -o /dev/null -w "%{http_code}\n" "https://$ORIGIN/health"   # 200
    curl -s "https://$ORIGIN/health"; echo                               # ok
    Checkpoint: 200 and ok. The first request after a deploy can take half a minute while the app starts; run it again before deciding it failed. If az webapp up itself fails, read the message: "not accepting new customers" or "Current Limit (F1 VMs): 0" means this region has no free plan for your subscription. Set LOC to another region and rerun the line (in our October 2026 run, westeurope refused and eastus had no F1 quota; centralus worked), deleting the .azure folder first so the command does not reuse the failed region's settings. A paid --sku B1 also works and costs about two cents an hour. Do not continue until both lines match, because Front Door cannot make a broken origin healthy. If you already have an app from Class 11 Part B with its own health route, you may set ORIGIN to that host instead.
  4. Create the profile and a public endpoint:

    az afd profile create --resource-group "$FD_RG" \
      --profile-name fd-campux --sku Standard_AzureFrontDoor
    az afd endpoint create --resource-group "$FD_RG" \
      --profile-name fd-campux --endpoint-name "$FD_ENDPOINT" --enabled-state Enabled
    On screen: the endpoint is a global entry name at Microsoft's edge — the front door itself. Nothing is routed anywhere yet; the next steps say where traffic goes and how health is judged.
  5. Create the origin group with the health probe — the honest one:

    az afd origin-group create --resource-group "$FD_RG" \
      --profile-name fd-campux --origin-group-name og-campux \
      --probe-request-type GET --probe-protocol Https \
      --probe-path /health --probe-interval-in-seconds 30 \
      --sample-size 4 --successful-samples-required 3 \
      --additional-latency-in-milliseconds 50
    The lesson: verify that /health exists and reflects this origin's readiness. With this single origin, Front Door has nowhere else to send a request even if the probe turns red. The probe is for learning here, not a failover demonstration.
  6. Add the origin, then a route tying the endpoint to the origin group:

    az afd origin create --resource-group "$FD_RG" \
      --profile-name fd-campux --origin-group-name og-campux \
      --origin-name storefront --host-name "$ORIGIN" \
      --origin-host-header "$ORIGIN" --https-port 443 \
      --priority 1 --weight 1000 --enabled-state Enabled
    az afd route create --resource-group "$FD_RG" \
      --profile-name fd-campux --endpoint-name "$FD_ENDPOINT" --route-name route \
      --origin-group og-campux --supported-protocols Https \
      --forwarding-protocol HttpsOnly --link-to-default-domain Enabled \
      --https-redirect Enabled
    On screen: browse the endpoint's *.azurefd.net hostname from the endpoint overview. Deployment and propagation can take time. This route leaves caching off so a dynamic page is not cached by accident.
  7. Compare the two paths. Ask Front Door for the same health route you checked on the origin:

    FD_HOST=$(az afd endpoint show -g "$FD_RG" --profile-name fd-campux \
      --endpoint-name "$FD_ENDPOINT" --query hostName -o tsv)
    curl -s -o /dev/null -w "%{http_code}\n" "https://$FD_HOST/health"
    Checkpoint: 200, the same answer as the origin. For a while you will see 404 while the new route propagates to the edge: in our run it took about nineteen minutes, so put the kettle on and retry every few minutes. A 404 that lasts more than forty-five minutes usually means the route or origin host name is wrong, so read them back with az afd route show. What you have proven: one request path through Front Door to one origin. What you have not: failover. That needs a second, independent origin in another region, which is a separate exercise and a separate bill.
  8. Tear down (Front Door Standard bills while it exists):

    cd ..
    az group delete --name "$FD_RG" --yes --no-wait
    This removes the origin app and its free plan too. Delete only the temporary group you created above. If you start a new Cloud Shell session, find its exact name in Resource groups before deleting.
Lab 2 · Azure Portal

Create a Front Door by hand

~12 minutes · the same front door, built so the create flow teaches you

Now build it by clicking. The quick-create flow bundles endpoint, origin, and route on one page — and the origin section is where the health probe is set. Use the same public origin host.

  1. Go to portal.azure.com and sign in.

  2. In the search bar at the top, type Front Door and CDN profiles, select it, then + Create and choose Quick create.On screen: Quick create asks for the tier (choose Standard), an endpoint name, and an origin — the three pieces you built one command at a time in Lab 1, now on a single form.

  3. Set Tier to Standard, name the profile and endpoint, and add the origin: origin type (App Services or Custom) and the public host name.On screen: Standard can use caching and a WAF policy, but neither should be assumed enabled or protective until configured and tested.

  4. Leave caching off for this dynamic site, then Review + create and create.Later: enable caching only for public static paths after checking cache headers. Do not cache accounts, carts or checkout.

  5. Once deployed, open the profile → Origin groups → your group → and find the health probe settings.On screen: inspect the path and status, and remember that one origin cannot fail over. Disable the probe for a continuing single-origin deployment when it serves no routing purpose.

  6. Tear down: delete the resource group (or the Front Door profile).

Portal wording drifts; if a label here does not match your screen, the anchors are the Front Door and CDN profiles service, Quick create, and the Origin groups / health probe settings.

Lab 3 · Explore the front door

Read routing, caching, and the probe on the blades

~5 minutes · look, do not change — learn the service by its screens

Open the Front Door you built and let each blade confirm a fact from the class.

  1. Open the profile's Origin groups and read the health probe and load-balancing settings.On screen: probe path, interval, and the sample counts that decide healthy vs unhealthy. This is the blade the whole §2 is about — a probe pointed at a static page is the most common self-inflicted outage in the topic.

  2. Open Endpoints and the routes under them.On screen: which paths forward to which origin group, and the HTTPS-redirect and caching rules. This is Layer 7 at work — routing on the request, not just the connection.

  3. Open Security and inspect any associated WAF policy.On screen: verify whether a policy exists, is associated with this endpoint and has the intended rules and mode. A tier choice alone does not prove protection.

On the job

The morning the probe said everything was fine

You · Cloud Engineer · green dashboard, angry inbox

Support reports failed checkout while the origin health display remains green. The probe reaches a static page on the origin, so it proves only that the web server can answer. Check checkout traces and database health. If the fault is confined to one origin, use a cheap readiness path that reflects its ability to serve checkout, then test that another origin actually takes new requests. If a shared database is down, marking every origin unhealthy will not restore checkout: repair or fail over that dependency and tell users the truth. Do not turn every edge probe into a database query.

Class Thirteen · Part II

Examination

Four drills, then two situations. Write your answer before you reveal the reasoning, or the exercise is worthless. Nothing is stored.

Drill 01Recall · pick the service
A public website needs a global HTTP entry point that can cache public static content, select among configured origins and apply a WAF policy. Which service provides those capabilities?
Marked

C. Front Door provides global HTTP routing and can cache eligible content or apply an associated WAF policy. A is regional Layer 4; B is regional Layer 7; D answers DNS and cannot inspect a page. Configure and test the cache, policy, origins and probes before claiming those outcomes.

Drill 02Select three
Which three are genuine capabilities of Azure Front Door?
Marked

Global HTTP routing, optional edge caching, and an associated WAF policy. Front Door supports these capabilities when configured. Raw TCP/UDP balancing belongs to a Layer 4 service. Traffic Manager steers DNS and never handles page content. An origin must exist and be healthy before Front Door can route to it.

Drill 03Spot the error
This health-probe configuration lets broken instances keep receiving customers. Which line is the cause?
Health probe — storefront backend pool

1.  Protocol:            HTTPS
2.  Path:                /   (static home page, returns 200 always)
3.  Interval:            30s, unhealthy after 3 failures
4.  Backend port:        443
Marked

Line two. Probing / — a static page that returns 200 regardless of whether the app can actually serve orders — means the probe reports healthy even when the instance's database is unreachable and every real request is failing. The probe measures "is the web server up," not "can this instance do its job," so the load balancer keeps routing customers to a machine that is silently broken. Lines one, three and four are reasonable.

If just one origin loses a dependency, a bounded readiness check can help route new requests to another working origin. If every origin uses the same failed database, all probes may go red, but Front Door still tries the origins. Monitor shared dependencies and provide a real recovery path; a probe alone cannot repair them.

Drill 04Recall · routing method
Which Traffic Manager method maps a DNS query to an endpoint based on inferred geographic location?
Marked

C. Geographic uses the inferred location of the DNS resolver or client subnet. That can differ from the end user's true location, so it cannot guarantee EU-only access or data residency. Performance uses a network-latency map; Priority prefers the highest-priority healthy endpoint; Weighted distributes DNS answers by assigned weights. Enforce a strict residency rule in the application and data architecture, not with DNS alone.

Situation 01Write before you reveal
Support reports the storefront is "down." But it loads fine for you, and for most customers — the complaints all come from people on one particular ISP in one city. Walk through how you diagnose this.
"Down" is the wrong word already. What does "down for one ISP only" actually tell you?
Reasoning

Measure who is affected. Reproduce from the affected ISP and compare another network, browser and location. An ISP-specific failure narrows the search but does not prove the origin is healthy for every request: a geographic rule, WAF policy or application behavior can also differ by client.

Trace the request. Compare DNS answers, TLS and HTTP errors, Front Door access and WAF logs, and origin logs. Check the path to the edge and the edge-to-origin leg. Change the component supported by evidence, then repeat the same requests from the affected ISP.

Separate "our problem" from "their path," then act accordingly. If it is a bad edge or a routing issue, you gather evidence and escalate with specifics rather than thrashing your own healthy backend. If it is DNS TTL or a misconfiguration on your side that only some resolvers have picked up, that is yours to fix. Either way, the discipline is the same: measure the blast radius before you touch anything, because "down" was a word that would have sent you debugging the one thing that was working.

Situation 02Write before you reveal
A teammate proposes adding Traffic Manager in front of the storefront "to cache pages globally and make the site faster." Is that what Traffic Manager does? Correct the plan.
What layer does Traffic Manager work at, and can something at that layer cache anything?
Reasoning

Name the category error: Traffic Manager works at DNS, and DNS cannot cache pages. Traffic Manager answers "what address should this name resolve to" and then steps out of the path entirely — it never sees a single request, so it cannot cache content, inspect it, or accelerate it. The teammate has asked a DNS director to do a content-delivery job it is architecturally incapable of.

Test the actual speed problem. A configured Front Door cache can serve eligible public static files near users. Measure where time is spent first; application work and personalized pages still reach an origin. If another existing CDN already serves static assets well, a new Front Door may add cost without solving the bottleneck.

Say where Traffic Manager would be right, so the correction teaches. Traffic Manager earns its place directing across endpoints of any protocol — for instance steering between two regions for disaster recovery, or across services Front Door does not front. It is a real tool for a real job; caching pages is simply not that job. Matching the service to the layer is the whole skill this class is training.

Examination record · first attempt
0/4
Class Thirteen · Part II · Complete
Retain this much

Five things worth carrying out of this class

  1. Front Door is a global HTTP request-path service; caching and WAF protection require deliberate configuration.
  2. Traffic Manager works at DNS only: it names an endpoint and never touches the traffic, so it cannot cache or inspect anything.
  3. Performance uses a latency map; Geographic uses inferred DNS-client location. Neither alone guarantees data residency.
  4. A probe should reflect origin readiness, but it cannot create a healthy second origin or repair a shared dependency.
  5. Choose a service after checking protocol, routing needs, existing infrastructure, recovery target and cost.
Notes
  1. See Microsoft's Front Door caching guidance and best practices. Cache only responses safe to share and verify the WAF policy association. ↩
  2. Traffic Manager works through DNS, so cached DNS answers can delay a changed routing decision. Front Door can choose another configured origin without changing the client's DNS answer, but detection and recovery are not instantaneous. ↩
  3. Application Gateway is a regional HTTP gateway. Front Door may sit in front of regional gateways when the requirements justify both; either can be unnecessary for a simpler workload. ↩
  4. Microsoft's Traffic Manager FAQ explains that resolver IP and client-subnet geography may not identify the end user accurately. ↩
  5. Microsoft's Front Door health-probe documentation and best practices describe routing when only one or no origins are healthy. ↩