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

πŸ“š Interview question

Design the alerting for a set of .NET services on Azure. Why do you alert on symptoms and SLO burn rate rather than causes such as high CPU, how do multi-window burn-rate alerts work, how do you set severities and route alerts to the right people, and what does every alert need?

Covers alerting design: symptom versus cause alerts, SLO burn-rate maths and multi-window rules, low-traffic services, severity and routing to owning teams, runbooks and alert metadata, and alerts as code with Azure Monitor and Prometheus.

Senior Architecture Advanced alerting azure-monitor burn-rate observability on-call slo

🎯 Key points

  • Page on symptoms users feel (error and latency SLIs, failed journeys, business outcomes), not causes like CPU 80%
  • Burn rate = observed error ratio ÷ (1 − SLO); 1× spends the budget exactly over the window
  • Multi-window, multi-burn-rate: 14.4× over 1 h + 5 m and 6× over 6 h + 30 m page; 1× over 3 days tickets
  • Low-traffic services: synthetic tests or minimum request counts instead of raw ratios
  • Severity decides the channel: page (Sev1) vs ticket (Sev3); route by owning team via labels or action groups
  • Every alert: owner, threshold and window, severity, impact summary, dashboard link, runbook link
  • Causes (CPU, thread pool queue, GC, connection pool) live on dashboards and tickets
  • Alerts as code (Bicep / PrometheusRule) with required metadata checked in CI

⏱ 30-second 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.

πŸ—£ Full answer (senior)

How I would answer this in an interview

"I start from what a page is: a request for a human to act now, at any hour. So a page should fire only when users are being hurt, or are about to be, and someone can do something about it. That's why I alert on symptoms, not causes. CPU at 85% on a .NET API might be completely fine, and plenty of outages, like a bad config value, an expired certificate or a dependency returning 500s, show nothing on CPU or memory at all. Symptoms are what users feel: the share of requests that fail, the share that are too slow, a checkout journey failing, orders per minute collapsing.

The way I turn symptoms into pages is SLO burn rate. If the SLO is 99.9% of requests succeeding over 30 days, the error budget is 0.1%. Burn rate is the current error ratio divided by that 0.1%. At 1Γ— you'd use exactly the whole budget in 30 days; at 14.4Γ— you'd use 2% of the month's budget in an hour. I use multiple windows: page if the burn is over 14.4Γ— for the last hour and still over it for the last five minutes, page if it's over 6Γ— for six hours and thirty minutes, and open a ticket for a slow 1Γ— burn over three days. The long window says it's big enough to matter; the short window says it's still happening, so the alert resolves quickly once it's fixed. For example, at [company] we [replaced ~40 static threshold rules with one burn-rate template per service], and [pages dropped by about 70% without missing an incident].

Then routing and metadata. Every alert carries a team and service label, or in Azure Monitor an action group per team, and a severity: Sev1 pages the owning rotation, Sev3 goes to the team's backlog. Every alert has a one-line impact summary, the threshold and window, a dashboard link and a runbook link. All of it lives in code next to the service, and CI rejects an alert without a runbook. The mistake I see is building alerts from whatever metrics exist; I build them from the SLOs and keep cause metrics on the dashboard the runbook links to."


Symptoms versus causes

Symptom (pages) Cause (dashboard or ticket)
5xx ratio burning the error budget Pod CPU, memory
Share of requests slower than 500 ms burning the latency budget Gen2 GC count, thread pool queue length
Synthetic sign-in failing in 3 of 5 locations One health check failed once
Order messages older than 10 minutes (users waiting) Queue length > 1,000
Orders per minute 50% below the same hour last week SQL DTU at 80%

The burn-rate table for a 99.9% / 30-day SLO

Long window Short window Burn rate Budget used when it fires Action
1 hour 5 minutes 14.4Γ— 2% Page (Sev1)
6 hours 30 minutes 6Γ— 5% Page (Sev2)
3 days 6 hours 1Γ— 10% Ticket (Sev3)

Severity and routing

Severity Meaning Channel Response
Sev1 Users badly affected now Page the owning team's on-call (PagerDuty / Opsgenie / action group SMS and voice) Acknowledge in 5 minutes
Sev2 Users affected, budget burning steadily Page in hours; chat channel out of hours (team's choice) Within 30 minutes
Sev3 Will become a problem (slow burn, cert in 30 days, disk growth) Ticket in the team backlog Next working day

Routing follows ownership: in Alertmanager, a team label selects the receiver; in Azure Monitor, each team has an action group, attached in the rule or at scale with alert processing rules scoped to the team's resource groups.

What every alert needs

Field Example
Owner team: orders β†’ orders on-call
Impact summary "Checkout errors are burning the 99.9% budget at 14Γ—"
Threshold and window 14.4Γ— over 1 h and 5 m
Severity Sev1
Dashboard Link to the service dashboard filtered to the time of the alert
Runbook Confirm impact, first three mitigations (roll back, disable flag, fail over), escalation path

Production example

For [12] .NET 10 services on AKS, each service got the same three burn-rate rules generated from a template, with SLIs from ASP.NET Core's http.server.request.duration. Pages fell from [about 35] to [about 8] a week, and during a [bad deployment that returned 500s for 4% of checkout requests] the 14.4Γ— rule paged in [6 minutes], long before CPU or memory moved at all.

πŸ” What the interviewer is checking

Checks the candidate can design an alerting system from SLOs, with correct burn-rate maths, sensible routing and alerts a human can act on.

Green flags

  • Explains symptoms versus causes with examples of failures causes miss
  • Gets the burn-rate maths right and explains why there are two windows
  • Handles low-traffic services and latency SLOs as ratios
  • Defines severities, ownership routing and required alert metadata, kept as code

Red flags

  • Proposes CPU and memory thresholds as the main pages
  • Can't explain what 14.4Γ— means or where it comes from
  • No owner or runbook on alerts; one channel for everything

πŸ“š Learn in depth

1. Why causes make bad pages

A cause alert assumes you know in advance how the system will break. Real failures are mostly new combinations, so cause alerts both over-fire (CPU high while users are fine) and under-fire (users failing while every resource looks normal). Symptoms are closer to what you promised users, so they catch unknown failure modes as well as known ones.

          causes (many, noisy)                symptoms (few, meaningful)
CPU ─┐                                     
GC  ─┼──► maybe ──►  user impact  ◄── measured directly by SLIs ──► page
DNS ──
bad config β”€β”˜ (no resource signal at all)

2. Burn-rate maths

  • Error budget for SLO S over window W: (1 βˆ’ S) Γ— W (for 99.9% over 30 days: 43.2 minutes of full outage, or 0.1% of requests).
  • Burn rate b = observed error ratio Γ· (1 βˆ’ S).
  • Fraction of budget spent in a lookback L: b Γ— L / W. For b = 14.4, L = 1 h, W = 720 h: 14.4 / 720 = 2%.
  • Time to exhaust the whole budget: W / b = 720 / 14.4 = 50 hours.

The short window (one twelfth of the long one is a common rule) stops the alert firing for an hour after the problem is already fixed.

3. Latency SLOs as ratios

To alert on latency the same way, define the SLI as a ratio: requests faster than the threshold Γ· all requests. With Prometheus histograms that's http_server_request_duration_seconds_bucket{le="0.5"} Γ· _count, so the bucket boundary must match the threshold. In Application Insights, countif(duration < 500) / count() over requests.

4. Low-traffic services

With 20 requests an hour, one failure is a 5% error ratio and a 50Γ— burn. Options:

  • add a minimum event count to the rule (and sum(rate(..._count[1h])) * 3600 > 100);
  • use synthetic tests as the availability SLI;
  • group several low-traffic endpoints into one SLO;
  • use longer windows and accept slower detection.

5. The alerting pipeline

.NET services ──OTel──► metrics store (Azure Monitor managed Prometheus / App Insights)
                               β”‚ recording rules: error ratios per window
                               β–Ό
                    alert rules (burn rate, synthetic, business)
                               β”‚ labels: team, service, severity, runbook
                               β–Ό
           Alertmanager / Azure Monitor alerts ── group, inhibit, suppress (maintenance)
                               β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        Sev1: page team                 Sev3: ticket in team backlog
        (PagerDuty/Opsgenie)            (Azure DevOps / Jira via webhook)

The alerting path must be monitored too: a dead-man's-switch alert (an always-firing Watchdog rule that pages if it stops arriving) catches a broken pipeline.

6. Business-outcome alerts

Some failures don't show up as errors: a payment provider silently declines everything, or a frontend bug hides the Buy button. A business symptom catches these: orders per minute compared with the same time last week, with a minimum volume so quiet hours don't page.

Try it yourself

  1. For a 99.5% SLO over 28 days, calculate the budget in minutes and the burn rate that spends 2% in one hour.
  2. Write the three burn-rate rules in PromQL for one service and fire them with a fault injector (return 500 for 5% of requests) in staging.
  3. Write the same 1-hour rule as an Azure Monitor log search alert over requests split by cloud_RoleName.
  4. Add a Watchdog alert and route it to a dead-man's-switch service; stop Prometheus and see who gets told.
  5. List every alert your team has and fill in the "what every alert needs" table for each; count how many you can't complete.

πŸ’» Code

One burn-rate rule set generated per service, with the metadata every alert needs, plus a business-outcome alert in KQL.

# PrometheusRule for Azure Monitor managed Prometheus or kube-prometheus-stack.
# SLO: 99.9% of orders-api requests succeed over 30 days. Budget = 0.001.
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: orders-api-slo
spec:
  groups:
    - name: orders-api-slo
      rules:
        # Recording rules: error ratio over each window (5xx Γ· all) from ASP.NET Core's http.server.request.duration
        - record: slo:orders_api:error_ratio:5m
          expr: sum(rate(http_server_request_duration_seconds_count{service="orders-api",http_response_status_code=~"5.."}[5m])) / sum(rate(http_server_request_duration_seconds_count{service="orders-api"}[5m]))
        - record: slo:orders_api:error_ratio:1h
          expr: sum(rate(http_server_request_duration_seconds_count{service="orders-api",http_response_status_code=~"5.."}[1h])) / sum(rate(http_server_request_duration_seconds_count{service="orders-api"}[1h]))
        - record: slo:orders_api:error_ratio:30m
          expr: sum(rate(http_server_request_duration_seconds_count{service="orders-api",http_response_status_code=~"5.."}[30m])) / sum(rate(http_server_request_duration_seconds_count{service="orders-api"}[30m]))
        - record: slo:orders_api:error_ratio:6h
          expr: sum(rate(http_server_request_duration_seconds_count{service="orders-api",http_response_status_code=~"5.."}[6h])) / sum(rate(http_server_request_duration_seconds_count{service="orders-api"}[6h]))

        - alert: OrdersApiBudgetBurnFast
          expr: slo:orders_api:error_ratio:1h > 14.4 * 0.001 and slo:orders_api:error_ratio:5m > 14.4 * 0.001
          labels: { severity: sev1, team: orders, service: orders-api }
          annotations:
            summary: "orders-api is failing {{ $value | humanizePercentage }} of requests (14.4x budget burn)"
            runbook_url: https://runbooks.example.internal/orders-api/budget-burn
            dashboard: https://grafana.example.internal/d/orders-api?from=now-3h

        - alert: OrdersApiBudgetBurnSlow
          expr: slo:orders_api:error_ratio:6h > 6 * 0.001 and slo:orders_api:error_ratio:30m > 6 * 0.001
          labels: { severity: sev2, team: orders, service: orders-api }
          annotations:
            summary: "orders-api is burning its error budget at 6x over 6 hours"
            runbook_url: https://runbooks.example.internal/orders-api/budget-burn
// Business symptom (Azure Monitor log alert, Sev2 β†’ orders action group):
// orders per 10 minutes more than 50% below the same window last week, ignoring quiet periods.
let now_count = toscalar(customEvents | where timestamp > ago(10m) and name == "OrderPlaced" | count);
let last_week = toscalar(customEvents | where timestamp between (ago(7d + 10m) .. ago(7d)) and name == "OrderPlaced" | count);
print now_count, last_week
| where last_week > 50 and now_count < 0.5 * last_week

⚠ Common mistakes

  • Mistake: Paging on CPU, memory or GC thresholds. Why it is wrong: they fire when users are fine and stay silent for failures with no resource signal (bad config, dependency 500s, expired certs). Instead: page on SLO burn and user journeys; keep causes on dashboards.
  • Mistake: A single static threshold such as "error rate > 1% for 5 minutes". Why it is wrong: it pages on harmless blips and never sees a slow 0.5% burn that spends the whole budget. Instead: multi-window, multi-burn-rate rules.
  • Mistake: Long-window burn alerts without a short window. Why it is wrong: the alert keeps firing for up to an hour after the fix, confusing on-call. Instead: pair every long window with a short one (about one twelfth).
  • Mistake: Raw error ratios on low-traffic services. Why it is wrong: one failure out of 20 requests looks like a 50Γ— burn and pages at 3 am. Instead: minimum request counts, synthetic SLIs or grouped SLOs.
  • Mistake: Measuring latency SLOs from averages or averaged p99s. Why it is wrong: averages hide the tail and percentiles can't be averaged. Instead: a ratio of requests under the threshold from histogram buckets.
  • Mistake: Alerts without an owner, severity or runbook. Why it is wrong: the person paged doesn't know if it's theirs, how urgent it is or what to do. Instead: required labels and annotations, enforced in CI.
  • Mistake: Sending every severity through the same channel. Why it is wrong: tickets wake people up and pages get treated like tickets. Instead: severity decides the channel: Sev1 pages, Sev3 creates a backlog item.
  • Mistake: Not monitoring the alerting pipeline. Why it is wrong: if Prometheus or the action group breaks, silence looks like health. Instead: a dead-man's-switch (Watchdog) alert and synthetic tests that don't depend on your metrics stack.

πŸ› Senior insight: trade-offs

Alerting is the contract between the system and the people on call. I design it top-down from SLOs, not bottom-up from available metrics: define the SLIs for each user-facing service, derive burn-rate pages from them, add a few journey and business-outcome alerts for failures that don't produce errors, and push everything else to dashboards and tickets. The design is only finished when routing, severities and runbooks are in place, because an alert nobody owns is noise.

Alert style When it fits Cost When not to
Multi-window burn rate Services with steady traffic and agreed SLOs Recording rules, SLO agreement Very low traffic without minimum counts
Static symptom threshold Before SLOs exist; simple queue age alerts Cheap Long term: tune to the SLO when you can
Synthetic journey Low-traffic or critical flows; outside-in coverage Test maintenance As the only signal
Business outcome Silent failures (declines, broken UI) Needs a seasonal baseline Very spiky or tiny volumes
Cause threshold as ticket Capacity, certificates, disk Daytime only Never as a page unless failure is imminent

I measure the alerting itself: pages per shift, actionable percentage, time from impact start to page, and how many incidents were reported by customers first. If customers report first, the symptom coverage has a gap.

πŸ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions alert fatigue or cleaning up existing alerts. Why: Checks they have actually reduced noise on a real rotation and can prove it with numbers.
    How to answer

    I'd describe it as an engineering problem with numbers. First I measured: pages per shift, how many were out of hours, and what percentage led to any action. Then I audited every alert with its owner: keep, fix, downgrade to a ticket, or delete.

    The big change is to page on symptoms, not causes: SLO burn-rate alerts on each .NET service's request success and latency (from ASP.NET Core's http.server.request.duration or the Application Insights requests table) and synthetic failures page; CPU, memory and single exceptions become dashboards or tickets. Then deduplicate and group (Alertmanager group_by and inhibit_rules; in Azure Monitor one rule split by service with stateful auto-resolve and alert processing rules for maintenance), route by ownership (a team label in Alertmanager, an action group per team in Azure Monitor), and give every page a runbook.

    I proved it with before/after numbers: pages per week, actionable percentage and whether real incidents were still caught. The trade-off is a little detection delay on some causes in exchange for an on-call rotation that trusts its pager.

  2. When: Candidate mentions error budgets or SLOs. Why: Checks they can define SLIs and SLOs properly, including latency SLOs from histograms.
    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.

  3. When: Candidate says cause metrics belong on dashboards. Why: Checks they can design the dashboard the runbook links to.
    How to answer

    An incident dashboard must answer three questions in the first screen: are users hurting, since when, and where. So the top row is SLO status and error budget, then RED for the service (rate, 5xx ratio, p50/p95/p99) with the SLO threshold drawn on the panels. The next row is RED for each dependency (database, downstream APIs, queues) so you can see where the fault starts. Below that, USE panels for the runtime, pods and database, collapsed by default.

    Every time series carries deploy and feature-flag annotations, because most incidents follow a change, and panels link to traces and logs filtered to the same service and time window. One template as code with service and region variables serves every service.

    The trade-off: fewer panels make it faster to read, but you need drill-down paths for the detail you removed.

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

A bad config deploy that CPU alerts never saw, caught by a burn-rate page
Situation
[12] .NET 10 services on AKS in Australia East with [Azure Monitor managed Prometheus and Grafana]. Alerting had been [CPU, memory and pod restart thresholds]. A feature-flag config change pointed the pricing client at a wrong endpoint for [one region's customers].
Signals
No CPU, memory or restart alerts fired. The new 14.4× burn-rate alert on checkout paged the orders on-call after [6 minutes]: 5xx ratio at [4%] over both 1 h and 5 m windows. Customer support tickets started arriving [20 minutes] later.
Investigation
Opened the dashboard from the alert's link: error ratio up, latency normal, no resource saturation. Split 5xx by route and dependency in Grafana, then pivoted to traces in Application Insights: failing spans all on `HTTP GET pricing` with DNS resolution errors. Compared the timeline with Azure App Configuration change history and found the endpoint change [8 minutes] before the page.
Resolution
Immediate: rolled back the configuration value in App Configuration; error ratio returned to baseline within [3 minutes]. Long term: added validation of endpoint settings at start-up with `ValidateOnStart`, and a staged rollout for configuration changes using labels per ring.
Prevention
Burn-rate templates rolled out to every service; CPU and memory thresholds demoted to dashboards; config changes added as annotations on dashboards; a synthetic checkout test per region; postmortem action to treat config as code with review.

How to tell it (STAR)

**S:** At [company] we ran [12] .NET services on AKS, and our alerts were mostly CPU, memory and restart thresholds. **T:** I [led the work / was part of the team] redesigning alerting around SLOs so we'd find user-facing failures before customers did. **A:** I defined error and latency SLIs from ASP.NET Core's request duration metric, generated multi-window burn-rate rules per service with owners, severities and runbooks, and moved cause metrics to dashboards. A few weeks later a configuration change broke pricing calls for [some customers]; nothing on CPU moved, but the 14.4× burn alert paged in [6 minutes], the runbook pointed us to recent config changes, and we rolled it back. **R:** Impact lasted [about 12 minutes] instead of the [hour-plus] it would have taken via support tickets, and weekly pages fell from [about 35] to [about 8].

↩ Usually asked after

More in Health and Alerts

Last updated 23 Nov 2026.

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me