📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

๐Ÿ“š Interview question

What is synthetic monitoring, and how is it different from real user monitoring and health checks? Explain single-request availability tests versus multi-step (user journey) tests, how you run them for a .NET app on Azure, which regions you test from, and how you alert on them without false alarms.

Covers synthetic monitoring versus RUM and health checks, Application Insights standard tests and custom TrackAvailability tests, multi-step Playwright journeys, choosing test locations, test accounts and data, and location-threshold alerting.

Mid-Level Theory Intermediate alerting application-insights availability-tests observability playwright synthetic-monitoring

๐ŸŽฏ Key points

  • Synthetic = scripted probes from outside on a schedule; finds outages with zero traffic, measures from the user's side
  • RUM measures real users (browser SDK); health checks are internal, orchestrator-facing
  • Application Insights standard test: one HTTP request, verb, headers, status and content match, SSL certificate expiry check
  • Classic URL ping tests: retirement extended from 30 Sep 2026 to 30 Sep 2028; multi-step web tests retired 31 Aug 2024
  • Multi-step journeys: Playwright (or similar) on a timer, reporting with TrackAvailability
  • At least 5 locations; alert threshold = locations − 2 to ignore one-region network noise
  • Test from where users are (Australia East plus nearby regions) and from outside your own network
  • Synthetic accounts with fake data only (Privacy Act 1988 / APPs), test payment mode, excluded from business metrics

โฑ 30-second answer

Synthetic monitoring runs scripted requests or user journeys against your app on a schedule from outside, typically from several regions. Unlike real user monitoring, it works when no users are active (3 am, a new region) and gives a consistent baseline; unlike health checks, it tests the whole path users take: DNS, TLS, Front Door, the app and its dependencies.

On Azure, an Application Insights standard test sends one HTTP request every 5-15 minutes from chosen locations and checks the status code, content and certificate expiry. For multi-step journeys (sign in, add to cart, pay) you run a Playwright script on a timer and report the result with TrackAvailability, using synthetic accounts with fake data and the payment provider's test mode, never real customers or cards.

Alert when several locations fail (for example 3 of 5), not one. The trade-off: synthetic tests are cheap and predictable but only cover the paths you script, so pair them with RUM and server-side SLIs.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"Synthetic monitoring means I script what a user does and run it against production on a schedule from outside my network, usually from several regions. Its big advantage is that it doesn't need real traffic: if the site breaks at 3 am, or a DNS or certificate change breaks one region, the synthetic test fails within minutes even though no customer has complained yet. Real user monitoring, like the Application Insights browser SDK, measures what actual users experience, so it has far better coverage but only when people are using the app. Health checks are different again: they're internal endpoints for Kubernetes or a load balancer, and they say nothing about DNS, TLS, Front Door or the login flow.

On Azure I'd start with Application Insights standard tests for the key URLs: one HTTP request, from at least five locations, every five minutes, checking the status code, a piece of content and that the TLS certificate isn't about to expire. For journeys that matter to the business, like sign in and checkout, I'd write a Playwright test, run it on a timer in an Azure Function or a Container Apps job, and report each run with TrackAvailability so it appears next to the standard tests. Those tests use dedicated synthetic accounts that hold only made-up data, the payment provider's test mode, and a request header that marks them as synthetic so they never pollute conversion metrics or reach real customers' data.

The mistake I see is alerting on a single failed run from a single location. The public internet is noisy, so that gives false pages. I alert when, say, three of five locations fail, and I choose locations where my users are: for an Australian product that's Australia East plus a couple of nearby regions, not five US regions. Synthetic tests tell you something is broken from the outside; they don't replace server-side SLIs."


Synthetic vs RUM vs health checks

Synthetic Real user monitoring Health checks
Who sends traffic Your scripts, from chosen regions Real browsers and apps Orchestrator / load balancer
Works with no users Yes No Yes
Coverage Only scripted paths Everything users do One instance's internals
Covers DNS, TLS, CDN, WAF Yes Yes No
Best for Uptime, journeys, certs, regional reachability Real performance (Core Web Vitals), errors by browser Restart and routing decisions

Options on Azure (as of November 2026)

Option What it does Notes
Standard test One request; verb, headers, body; status and content match; SSL certificate validity and expiry warning The recommended single-request test; billed per execution
URL ping test (classic) One GET Originally due to retire 30 September 2026; Microsoft extended this to 30 September 2028. Migrate to standard tests anyway: existing ping tests are removed on that date
Multi-step web test (classic) Recorded Visual Studio web test Retired 31 August 2024; rebuild as custom tests
Custom TrackAvailability test Your code runs a journey and reports an availability result Playwright in an Azure Function or Container Apps job on a schedule
Third-party (Grafana Synthetic Monitoring, Checkly, Datadog) Browser and API checks from global probes Useful when you're not all-in on Azure Monitor

Choosing locations

  • At least five locations so one region's network issue doesn't look like an outage.
  • Pick regions near your users. For an Australian audience, include the Australian location plus nearby Asia-Pacific regions; add a far region only if you have users there.
  • Include at least one location outside Azure if you can (a third-party probe) so an Azure networking problem doesn't hide itself.

Alerting without false alarms

Setting Recommendation
Frequency 5 minutes for critical paths
Location threshold Number of locations โˆ’ 2 (e.g. 3 of 5)
Retries Enable retries for standard tests (a failed request is retried before it counts)
Timeout Set above normal p99 from the furthest location (e.g. 30 s for a page, 10 s for an API) so cross-region latency isn't a failure
Window Evaluate over 5-15 minutes so one slow run doesn't page
Who gets paged The owning service's on-call, via an action group, with a runbook link
Certificate expiry Warning ticket at 30 days, page at 7 days

Production example

For a [booking site] with [90%] of users in Australia, we ran a standard test on / and /api/health/ready from five locations every five minutes, and a Playwright checkout test every ten minutes against a synthetic account. On a [Saturday night] an expired certificate on a new Front Door custom domain failed the standard tests from all locations within [6 minutes]; nobody had complained yet, and the fix was live before [Sunday morning] traffic.

๐Ÿ” What the interviewer is checking

Checks the candidate knows when outside-in monitoring is needed and can run it reliably on Azure without noise.

Green flags

  • Explains the difference from RUM and health checks with what each can and can't see
  • Knows standard tests and that classic multi-step tests are retired; uses custom tests for journeys
  • Uses multiple locations near users and a location threshold for alerting
  • Handles synthetic accounts, data and exclusion from business metrics

Red flags

  • Thinks a Kubernetes liveness probe is synthetic monitoring
  • Pages on a single failure from one location
  • Uses real customer accounts or cards in tests

๐Ÿ“š Learn in depth

1. Where synthetic tests sit in the request path

probe (Australia East)  probe (Southeast Asia)  probe (third party)
        \                     |                      /
         \                    |                     /
          DNS โ”€โ–บ TLS โ”€โ–บ Front Door / WAF โ”€โ–บ App Gateway โ”€โ–บ AKS ingress โ”€โ–บ API โ”€โ–บ SQL / Redis
                                                                  โ–ฒ
                                                     health probes only see from here

A synthetic test exercises everything to the left of the app as well as the app itself. That is exactly the part internal monitoring can't see: expired certificates, DNS mistakes, WAF rules blocking a path, a CDN serving stale errors.

2. What a standard test checks

Each run from each location:

  1. Resolves DNS and connects (optionally following redirects).
  2. Sends the request with your verb, headers and body.
  3. Checks the response status (e.g. 200) and, optionally, that the body contains a string.
  4. Checks the TLS certificate is valid and, if configured, that it doesn't expire within N days.
  5. Records an availabilityResults row: success, duration, location, message.

An alert rule fires when the number of failing locations reaches the threshold within the window.

3. Multi-step journeys with custom tests

Classic multi-step web tests depended on the retired Visual Studio load-test tooling, so journeys are now your own code:

Timer trigger (every 10 min, per region)
   โ”‚
   โ–ผ
Playwright: open site โ†’ sign in as synthetic user โ†’ search โ†’ add to cart โ†’ pay (test card)
   โ”‚
   โ”œโ”€ success + duration โ”€โ”€โ–บ TrackAvailability(name, location, success)
   โ””โ”€ failure โ”€โ”€โ–บ screenshot + trace to blob storage, message with the failing step

Run the function in more than one region (for example Australia East and Australia Southeast) so a single region failing doesn't look like a global outage, and set the RunLocation accordingly.

4. Synthetic data hygiene

  • Synthetic accounts are clearly marked (synthetic-*), have no real personal data (Privacy Act: test data should not be real people) and are excluded from analytics, emails and fraud models.
  • Orders use a test payment method and are cancelled or cleaned up automatically.
  • Requests carry a header (e.g. X-Synthetic: true) or a known user agent so dashboards and SLIs can include or exclude them deliberately.

5. What synthetic tests can't do

They only see the paths you script, with the data you chose, from probe networks rather than real ISPs and phones. Real user monitoring (Core Web Vitals, browser errors) and server-side SLIs fill those gaps. Synthetic results are a good availability SLI for low-traffic services, where request-based SLIs are too noisy.

6. Cost

Standard tests are billed per execution. Five locations every five minutes is 5 ร— 12 ร— 24 ร— 30 = 43,200 runs per month per test, so keep the list of tests short and focused on critical paths. Custom tests cost the compute plus telemetry ingestion.

Try it yourself

  1. Create a standard test in Application Insights for a sample app from five locations, with an SSL expiry check of 30 days.
  2. Query the results:
    availabilityResults
    | where timestamp > ago(24h)
    | summarize availability = 100.0 * countif(success == 1) / count(), p95 = percentile(duration, 95) by location, bin(timestamp, 1h)
    
  3. Write a Playwright test for a two-step journey and run it from a timer-triggered Azure Function that calls TrackAvailability.
  4. Break one step (rename a button) and check that the failure message names the step.
  5. Calculate the monthly executions and cost of your test list before turning it on.

๐Ÿ’ป Code

A custom multi-step availability test: Playwright in a timer-triggered Azure Function (isolated worker), reported to Application Insights.

// SyntheticCheckout.cs (.NET 10, Azure Functions isolated worker)
// Packages: Microsoft.Azure.Functions.Worker.Extensions.Timer, Microsoft.Playwright, Microsoft.ApplicationInsights
namespace Synthetics;

using System.Diagnostics;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Configuration;
using Microsoft.Playwright;

public sealed class SyntheticCheckout(TelemetryClient telemetry, IConfiguration config)
{
    [Function(nameof(SyntheticCheckout))]
    public async Task RunAsync([TimerTrigger("0 */10 * * * *")] TimerInfo timer, CancellationToken cancellationToken)
    {
        var availability = new AvailabilityTelemetry
        {
            Name = "checkout-journey",
            RunLocation = config["REGION_NAME"] ?? "unknown", // e.g. "Australia East"
            Timestamp = DateTimeOffset.UtcNow
        };
        var step = "start";
        var sw = Stopwatch.StartNew();

        try
        {
            using var playwright = await Playwright.CreateAsync();
            await using var browser = await playwright.Chromium.LaunchAsync(new() { Headless = true });
            var page = await browser.NewPageAsync(new() { ExtraHTTPHeaders = new Dictionary<string, string> { ["X-Synthetic"] = "true" } });
            page.SetDefaultTimeout(15_000);

            step = "sign-in";
            await page.GotoAsync(config["BASE_URL"]!);
            await page.GetByLabel("Email").FillAsync(config["SYNTHETIC_USER"]!);   // synthetic account, no real personal data
            await page.GetByLabel("Password").FillAsync(config["SYNTHETIC_PASSWORD"]!); // from Key Vault reference
            await page.GetByRole(AriaRole.Button, new() { Name = "Sign in" }).ClickAsync();

            step = "add-to-cart";
            await page.GetByRole(AriaRole.Link, new() { Name = "Synthetic test product" }).ClickAsync();
            await page.GetByRole(AriaRole.Button, new() { Name = "Add to cart" }).ClickAsync();

            step = "checkout";
            await page.GetByRole(AriaRole.Link, new() { Name = "Checkout" }).ClickAsync();
            await page.GetByText("Order confirmed").WaitForAsync();

            availability.Success = true;
            availability.Message = "ok";
        }
        catch (Exception ex)
        {
            availability.Success = false;
            availability.Message = $"Failed at step '{step}': {ex.GetType().Name}"; // step name makes the alert actionable
        }
        finally
        {
            availability.Duration = sw.Elapsed;
            telemetry.TrackAvailability(availability);
            await telemetry.FlushAsync(cancellationToken);
        }
    }
}
// Alert query: page when the journey fails in 2 or more regions in 20 minutes
availabilityResults
| where timestamp > ago(20m) and name == "checkout-journey"
| summarize failures = countif(success == 0) by location
| where failures >= 2
| summarize failingLocations = dcount(location)
| where failingLocations >= 2

โš  Common mistakes

  • Mistake: Alerting when one location fails once. Why it is wrong: internet and probe-side blips cause false pages and teach on-call to ignore the alert. Instead: at least five locations, threshold of locations โˆ’ 2, retries on, and an evaluation window of 5-15 minutes.
  • Mistake: Timeouts tuned for the nearest region. Why it is wrong: a probe on another continent adds hundreds of milliseconds per round trip, so it fails on latency, not availability. Instead: set the timeout from the furthest location's normal p99 and track latency separately per location.
  • Mistake: Treating a health endpoint check from inside the cluster as synthetic monitoring. Why it is wrong: it misses DNS, TLS, the WAF, Front Door and the real user path. Instead: test public URLs from outside your network.
  • Mistake: Building new monitoring on classic URL ping tests or still relying on multi-step web tests. Why it is wrong: multi-step tests were retired on 31 August 2024 and ping tests will be removed on 30 September 2028. Instead: standard tests for single requests, custom TrackAvailability tests for journeys.
  • Mistake: Running journeys with a real customer account or a real card. Why it is wrong: it processes real personal information for a purpose the person didn't agree to (Privacy Act 1988 APP 6, and GDPR if you have EU users), mixes test traffic into business data and can trigger real charges. Instead: dedicated synthetic accounts with made-up data, the payment provider's test mode or a test merchant, automatic clean-up.
  • Mistake: Not excluding synthetic traffic from business metrics. Why it is wrong: conversion, revenue and SLI numbers are skewed, especially on low-traffic services. Instead: tag requests (X-Synthetic) and filter deliberately.
  • Mistake: Choosing default test locations far from users. Why it is wrong: latency numbers are meaningless and regional problems near users go unseen. Instead: pick regions where your users are, plus one outside your cloud.
  • Mistake: Failure messages that only say "timeout". Why it is wrong: on-call can't tell which step broke. Instead: record the failing step, a screenshot and a Playwright trace.
  • Mistake: Hundreds of tests every minute. Why it is wrong: cost grows with executions and the signal doesn't improve. Instead: a few critical journeys at 5-10 minute intervals.

๐Ÿ› Senior insight: trade-offs

Synthetic tests are the outside-in view: they answer "can a user do X right now from Y?" independently of your own telemetry pipeline, which is exactly why they are valuable when that pipeline is broken too. I keep the set small and tied to business journeys, and I treat a failing journey as a symptom-based page, while the server-side SLIs tell me why.

They work best wired into the rest of observability rather than as a separate tool: the synthetic request carries a traceparent, so a failed run links straight to the server-side trace in Application Insights; results feed the service's availability SLI for low-traffic services; per-location latency goes on the service dashboard next to RUM's Core Web Vitals; and every failure that wasn't caught by server-side alerts becomes an action in the postmortem ("why did only the synthetic test see this?").

Approach When it fits Cost When not to
Standard test on key URLs Every public app; cert and DNS coverage Per execution, low As the only signal for complex flows
Custom Playwright journey Sign-in, checkout, booking: revenue paths Compute, maintenance when the UI changes Flows with side effects you can't clean up
Synthetic as availability SLI Low-traffic services, B2B APIs used in bursts Low High-traffic services where request SLIs are better
Third-party probes Independence from your cloud provider Subscription Small internal apps

Measure the tests themselves: false-alarm rate per test, time from real outage to synthetic alert, and flakiness. A flaky synthetic test is worse than none because people stop trusting it.

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions pointing the test at a health endpoint. Why: Checks they know what health endpoints check and why a public test shouldn't expose health details.
    How to answer

    Health checks are a built-in ASP.NET Core feature that lets an orchestrator, load balancer or monitor ask the app "are you OK?" over HTTP. You register checks with builder.Services.AddHealthChecks(), each one an IHealthCheck that returns Healthy, Degraded or Unhealthy, and expose them with app.MapHealthChecks("/health"). By default Healthy and Degraded return 200 and Unhealthy returns 503. Degraded means "still serving, but something non-critical is slow or down" (a cache, an optional feature), so the instance stays in rotation while you get a signal.

    Dependency checks (SQL Server, Redis, Service Bus) come from AddDbContextCheck<T>() or the community AspNetCore.HealthChecks.* packages, each with a short timeout. With tags and a Predicate you expose two endpoints:

    • Liveness: no dependencies, just "the process is responsive".
    • Readiness: "I can serve traffic now", including critical dependencies.

    The trade-off: more checks give more truth but make the endpoint slower and make it easier for a shared dependency to take every instance out at once.

  2. When: Candidate talks about paging on synthetic failures. Why: Checks they alert on symptoms with clear ownership and runbooks.
    How to answer

    Alert on symptoms users feel, such as the request error-rate or latency SLI, failed synthetic journeys or orders per minute dropping, because causes like CPU at 80% often hurt nobody and miss failures with no resource signal at all. The best symptom alert is SLO burn rate: how fast you are spending the error budget. With a 99.9% SLO, a 14.4ร— burn over 1 hour (confirmed over 5 minutes) spends 2% of a 30-day budget and pages; 6ร— over 6 hours pages; slower burns raise a ticket.

    Every alert needs who gets paged (the owning team's rotation), the threshold and window, a severity that decides page versus ticket, a dashboard link and a runbook with the first mitigation steps. Cause metrics stay on dashboards for diagnosis. The trade-off: fewer pages means a slightly later warning for slow-building problems, which tickets cover.

  3. When: Candidate suggests using synthetic results as an availability measure. Why: Checks they can turn availability results into an SLI and SLO with an error budget.
    How to answer

    An SLI is a measurement of user experience expressed as a ratio of good events to valid events, for example requests to /api/orders answered in under 300 ms with a non-5xx status รท all requests. An SLO is the internal target for that SLI over a rolling window, such as 99% over 28 days. An SLA is the external contract with financial penalties, deliberately looser than the SLO (say 99.5% vs 99.9%) so you breach the SLO first.

    To turn a latency percentile into an SLO, rephrase it as a threshold ratio: "99% of requests complete in under 300 ms", computed from the ASP.NET Core http.server.request.duration histogram buckets, not by averaging p99s. The error budget is 1 โˆ’ SLO: at 99.9% over 30 days that is about 43 minutes or 0.1% of requests. When the budget is spent, risky releases pause and reliability work takes priority. The trade-off: each extra nine costs far more engineering and infrastructure.

๐Ÿ›  Real-world problems: how you handle them

Expired certificate on a new custom domain caught by synthetic tests before customers
Situation
A [booking platform] for an Australian audience runs .NET 10 APIs on AKS behind Azure Front Door. A [new custom domain] was added [three months] earlier with a manually uploaded certificate. Server-side dashboards only see traffic that reaches the app.
Signals
At [23:40 on a Saturday] the standard test on the home page and the checkout journey test fail from all five locations with an SSL error. Server-side request rate drops by [70%] but no server errors are logged, because requests never reach the app. No customer reports yet.
Investigation
Opened the failed results in Application Insights availability blade: message showed certificate expired. Queried `availabilityResults | where success == 0 | summarize by location, message` to confirm all locations and the same error. Checked Front Door's custom domain blade: the certificate was BYOC from Key Vault and had expired; the managed certificate option had not been used. Confirmed with `curl -vI` from a laptop.
Resolution
Immediate: uploaded the renewed certificate to Key Vault and updated the Front Door secret version; tests went green within [10 minutes]. Long term: switched the domain to a Front Door managed certificate with auto-rotation and set the Key Vault secret to latest version for the remaining BYOC domains.
Prevention
Turned on the standard tests' certificate expiry check at 30 days (ticket) and 7 days (page). Added an Azure Policy and a Key Vault near-expiry Event Grid alert. Added every custom domain to the synthetic test list as part of the domain onboarding checklist.

How to tell it (STAR)

**S:** At [company], our [booking platform] served mainly Australian customers through Azure Front Door, and a custom domain had been added months earlier with a manually managed certificate. **T:** I was on call when synthetic tests started failing late on a [Saturday], and my job was to restore access before Sunday morning bookings. **A:** The standard tests and our Playwright checkout journey failed in all five locations with an SSL error, while the app showed no errors because traffic wasn't reaching it. I confirmed the expired certificate in Front Door, rotated it from Key Vault, and watched the tests recover. Afterwards I moved the domain to a managed certificate and added expiry checks at 30 and 7 days. **R:** We restored service in [25 minutes] with [no customer complaints], and we haven't had a certificate-related outage in [the year since].

โ†ฉ Usually asked after

More in Health and Alerts

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

โช Previous ๐Ÿ  Main Next โฉ
๐Ÿ’ฌ Chat with me