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

๐Ÿ“š Interview question

What is the incident lifecycle? Walk me through detect, triage, mitigate, resolve and review, what happens at each stage for a .NET service on Azure, and how you know when an incident is actually over.

Covers the five stages of the incident lifecycle (detection, triage, mitigation, resolution, post-incident review), who does what at each stage, the timestamps that drive MTTD and MTTR, and the exit criteria for closing an incident.

Junior Theory Beginner incident-lifecycle incident-response mttr observability on-call postmortem

๐ŸŽฏ Key points

  • Five stages: detect, triage, mitigate, resolve, review
  • Detection ideally from symptom/SLO alerts, not customer reports
  • Triage sets severity from customer impact and assigns an incident commander
  • Mitigation restores service first, guided by a hypothesis about what changed
  • Resolution = SLI back inside SLO for an agreed period, then the incident is closed
  • Timestamps per stage give MTTD, time to mitigate and MTTR
  • Communication to stakeholders on a fixed cadence throughout
  • Review: blameless postmortem with owned, dated corrective actions

โฑ 30-second answer

An incident moves through detect โ†’ triage โ†’ mitigate โ†’ resolve โ†’ review. Detection should come from alerts on customer-facing symptoms (error rate, latency, SLO burn), not from customers ringing support. Triage decides how bad it is (severity), who leads it (the incident commander) and who else is needed. Mitigation stops the customer pain as fast as possible โ€” roll back, turn a feature flag off, fail over โ€” guided by a working hypothesis about what changed, without waiting for a proven root cause. Resolution is when the SLIs are back inside their SLOs and stay there. Review is the blameless postmortem that produces owned, dated fixes. Communication to stakeholders runs through every stage.

The timestamps between the stages give you time to detect, time to mitigate and time to resolve. The main trade-off is speed versus understanding: you restore service first and investigate second.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"I think of an incident as five stages. First, detection: something tells us customers are hurting. Ideally that's an alert on a symptom โ€” the checkout error rate in Application Insights going over its threshold, or an SLO burn-rate alert โ€” rather than a support ticket, because if customers find out before we do, we've already lost time.

Second, triage: someone acknowledges the page, opens an incident channel, works out the impact โ€” how many users, which features, is data at risk โ€” and sets a severity. For anything serious one person becomes the incident commander, who coordinates rather than debugs. Third, mitigation: we restore service as fast as possible with the safest reversible lever that fits what changed. If a release just went out, that means rolling it back โ€” on Azure App Service by swapping the staging slot back, on AKS with kubectl rollout undo. Otherwise it might be turning off a feature flag, scaling out, or failing over to Australia Southeast. We don't need the proven root cause to mitigate; we need a good hypothesis about what changed.

Fourth, resolution: the SLIs are back in range and have stayed there for an agreed period, temporary fixes are either made permanent or tracked, and we tell customers it's over. Fifth, review: a blameless postmortem with a timeline, contributing factors and corrective actions that each have an owner and a date. All the way through, someone keeps stakeholders and support updated on a fixed cadence. The mistake I see is teams treating 'the graph went green' as the end. If there's no review, the same incident comes back in three months."


The stages at a glance

Stage Goal Typical actions Output
Detect Know quickly that users are affected Symptom and SLO alerts, synthetic tests, support escalation A page, a start timestamp
Triage Size it and staff it Acknowledge, check impact, set severity, name the incident commander Severity, roles, incident channel
Mitigate Stop the pain Rollback (slot swap on App Service, rollout undo on AKS), feature flag off, scale out, failover, block bad traffic Customer impact stops
Resolve Return to a stable normal Confirm SLIs inside SLO, remove temporary hacks or track them, communicate Incident closed
Review Learn and stop it recurring Blameless postmortem, timeline, actions with owners Postmortem doc, backlog items

The numbers that come out of it

Metric From โ†’ to What it tells you
Time to detect (MTTD) Impact starts โ†’ first alert Is your alerting good enough?
Time to acknowledge Alert โ†’ a human responds Is on-call working?
Time to mitigate Alert โ†’ customer impact stops Are your rollback and flags fast?
Time to resolve (MTTR) Impact starts โ†’ incident closed Overall recovery capability

Averaged MTTR hides a lot โ€” one 6-hour incident and nine 5-minute ones average to 40.5 minutes. Look at the distribution and at individual incidents.

Communication through the lifecycle

Stage Who hears what
Triage Incident declared, severity, channel link
Mitigate Regular updates (for example every 30 minutes for Sev 1): impact, action, next update time
Resolve 'Resolved' notice on the status page and to support
Review Postmortem shared with the wider engineering group

When is an incident really over?

  • The SLIs that triggered it have been back inside their SLO for an agreed window (for example 30 minutes).
  • No temporary mitigation is still in place without a ticket (a scaled-out plan, a disabled feature).
  • Status page and stakeholders have been updated.
  • A postmortem owner and date are set.

Production example

After a release, the payments API's 5xx rate went from 0.1% to 8%. The burn-rate alert paged on-call 3 minutes after impact started, triage set it as Sev 2 at minute 6, and a deployment slot swap back to the previous build stopped the errors at minute 14. The postmortem found a missing configuration value, and the corrective action was to add ValidateOnStart and a smoke test to the slot before swapping.

๐Ÿ” What the interviewer is checking

Checks that the candidate knows incidents have a structure, that restoring service comes before finding the root cause, and that the process ends in learning.

Green flags

  • Names all five stages and the goal of each
  • Says mitigation does not need the root cause
  • Mentions severity, an incident commander and a single channel
  • Defines when an incident is over
  • Mentions blameless review with owned actions

Red flags

  • "I'd start reading the logs to find the bug" as the first step
  • No mention of communication or roles
  • Treats the postmortem as optional or as finding who to blame

๐Ÿ“š Learn in depth

1. Why a lifecycle at all

Under pressure, people jump straight to debugging. A shared lifecycle gives everyone the same map: what stage are we in, what is the goal of this stage, and what has to be true before we move on. It also gives you consistent timestamps, which is how you measure whether you're getting better.

impact starts
    |
    v
[DETECT] --alert--> [TRIAGE] --severity, IC--> [MITIGATE] --impact stops--> [RESOLVE] --closed--> [REVIEW]
    ^                                                                                              |
    +------------------------- corrective actions improve alerts, tests, rollbacks ----------------+

The loop back is the point: review feeds better detection and faster mitigation next time.

2. Detection sources, best to worst

  1. SLO burn-rate alerts on user-facing SLIs (availability, latency) โ€” catch real impact with few false alarms.
  2. Symptom alerts (5xx rate, p99 latency) from Application Insights or Prometheus.
  3. Synthetic tests โ€” catch total outages even with zero traffic, such as at 3 am.
  4. Cause alerts (CPU, queue depth) โ€” useful as context, noisy as pages.
  5. Customers and support โ€” the slowest and most expensive detector.

A useful postmortem question is always "how did we find out, and could we have found out sooner?"

3. Triage in one minute

The responder answers four questions: Is it real? Who is affected and how badly? Is it getting worse? Who do I need? From that comes the severity, which decides who gets paged and how often you communicate.

4. Mitigation is not the fix

Mitigation changes the system back to a known-good state or routes around the problem. A rollback undoes the release; it doesn't explain why the release broke. That is fine โ€” explanation is the job of the review, done calmly with full data.

5. Resolution and the 'flapping' trap

If you close an incident the moment the graph recovers, a recurrence ten minutes later starts a new incident with a new timeline and confuses everyone. Waiting for a stability window, and keeping the same channel open until then, avoids this.

6. Review

The postmortem reconstructs the timeline from alerts, chat and deployment logs, identifies contributing factors (not 'who'), and produces actions that change the system: a test, an alert, a guard rail. Actions without owners and due dates rarely get done.

Try it yourself

  1. Take your last incident (or a public one) and write the five timestamps: impact start, alert, acknowledge, mitigated, resolved. Calculate MTTD and time to mitigate.
  2. In Application Insights, write a KQL query that finds when the 5xx rate first went above 1% for a past window.
  3. Practise a rollback: deploy two versions to an App Service with a staging slot and time a swap back.
  4. Write a one-page incident checklist for your team: who declares, where the channel is, who updates the status page.
  5. Read two public postmortems and label each paragraph with the lifecycle stage it describes.

๐Ÿ’ป Code

A small model of an incident timeline. Recording a timestamp for each stage is what lets you calculate time to detect and time to mitigate afterwards.

namespace Incidents;

public enum IncidentStage { Detected, Triaged, Mitigated, Resolved, Reviewed }

public sealed record TimelineEntry(DateTimeOffset At, IncidentStage Stage, string Note);

public sealed class Incident(string title, DateTimeOffset impactStartedAt)
{
    private readonly List<TimelineEntry> _timeline = [];

    public string Title { get; } = title;
    public DateTimeOffset ImpactStartedAt { get; } = impactStartedAt;
    public IReadOnlyList<TimelineEntry> Timeline => _timeline;

    public void Record(IncidentStage stage, string note, TimeProvider clock)
    {
        // Stages must move forward: you can't resolve before you've mitigated.
        if (_timeline.Count > 0 && stage < _timeline[^1].Stage)
            throw new InvalidOperationException($"Cannot move from {_timeline[^1].Stage} back to {stage}.");

        _timeline.Add(new TimelineEntry(clock.GetUtcNow(), stage, note));
    }

    // Time to detect: impact start -> first alert.
    public TimeSpan? TimeToDetect => At(IncidentStage.Detected) - ImpactStartedAt;

    // Time to mitigate: first alert -> customer impact stopped.
    public TimeSpan? TimeToMitigate => At(IncidentStage.Mitigated) - At(IncidentStage.Detected);

    private DateTimeOffset? At(IncidentStage stage) =>
        _timeline.FirstOrDefault(e => e.Stage == stage)?.At;
}

The same question asked of telemetry: when did the failure rate first cross 1%?

requests
| where timestamp between (datetime(2026-11-20 01:00) .. datetime(2026-11-20 03:00))
| summarize failureRate = 100.0 * countif(success == false) / count() by bin(timestamp, 1m)
| where failureRate > 1
| top 1 by timestamp asc   // first minute of customer impact

โš  Common mistakes

  • Mistake: Jumping straight into debugging when the page arrives. Why it is wrong: Nobody sets severity or tells stakeholders, and customers keep failing while you read logs. Instead: Spend the first minutes on triage and the fastest safe mitigation.
  • Mistake: Waiting for the root cause before mitigating. Why it is wrong: Root cause can take hours; customers pay for every minute. Instead: Roll back or turn off the change you suspect, then investigate.
  • Mistake: Closing the incident the moment the graph recovers. Why it is wrong: Flapping problems come back and start a confusing second incident. Instead: Wait for the SLI to stay inside the SLO for an agreed window.
  • Mistake: Relying on customers to detect incidents. Why it is wrong: Time to detect becomes hours and trust drops. Instead: Alert on user-facing symptoms and run synthetic tests.
  • Mistake: Not recording stage timestamps or defining what 'resolved' means. Why it is wrong: You can't measure time to detect or mitigate, so you can't show whether changes helped. Instead: Record a timestamp per stage and agree the SLI-based exit criteria up front.
  • Mistake: Going silent while working the problem. Why it is wrong: Support and stakeholders interrupt responders and customers lose trust. Instead: Post updates on a fixed cadence, even 'no change'.
  • Mistake: Skipping the review for 'small' incidents. Why it is wrong: Small incidents are cheap warnings of big ones. Instead: Do a short review for every customer-affecting incident.

๐Ÿ› Senior insight: trade-offs

Even at a junior level, the strongest answers separate mitigation from resolution and from root cause. Interviewers listen for "restore service first" and for measurable stages โ€” once you record timestamps you can show that a change (a faster rollback, a better alert) actually improved time to mitigate.

Detection source When it fits Cost When not to rely on it
SLO burn-rate alert Any user-facing service with an SLO Needs SLIs defined Very low-traffic services (noisy ratios)
Synthetic test Critical journeys, quiet hours Test maintenance As the only signal; it can't see real-user variety
Cause alert (CPU, memory) Capacity planning, context Many false pages As a page on its own
Customer report Last resort Reputation Ever as the primary detector

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions triage or severity. Why: Checks that the candidate can size an incident by impact and knows the coordinating role.
    How to answer

    Severity describes customer and business impact, not the technical cause: how many users, which function (checkout versus a report), whether data or security is at risk, and whether it is getting worse. Teams write down 3โ€“5 levels with examples โ€” a Sev 1 is 'checkout down for everyone' or 'personal data exposed', a Sev 3 is 'one admin report is slow'. Severity then decides who is paged, which roles are filled and how often you communicate.

    For anything Sev 2 or above, one person becomes the incident commander (IC): they own decisions, roles and communication, and deliberately don't debug. An ops lead investigates, a comms lead updates stakeholders, a scribe keeps the timeline. Rule of thumb: declare high and downgrade โ€” the cost of over-staffing for 20 minutes is small compared with an under-staffed outage.

  2. When: Candidate says 'restore service first'. Why: Checks practical mitigation levers and the judgement to use them.
    How to answer

    Every minute of an outage costs customers, revenue and trust โ€” for a busy checkout that can be thousands of dollars a minute โ€” while the root cause can be found later from preserved telemetry. So responders ask "what changed?" and reach for the fastest, safest, reversible lever: roll back the release (an App Service slot swap or a previous container image), turn off the feature flag, scale out if it's genuinely capacity, fail over to Australia Southeast if a region is impaired, or shed load with rate limiting to protect the critical path.

    Good mitigation is rehearsed (a rollback you've never practised is a new risk), done one change at a time and verified against the SLIs. The trade-off is speed versus evidence: grab the evidence first when it costs seconds (a memory dump, a log export, a note of the deploy id), because a restart or rollback can destroy what explains the cause โ€” but never delay mitigation by minutes to do it.

  3. When: Candidate mentions SLOs as the definition of 'resolved'. Why: Checks the candidate understands SLIs, SLOs and error budgets.
    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.

โ†ฉ Usually asked after

More in Incident Response

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

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