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

๐Ÿ“š Interview question

Your team is about to take a new .NET 10 service live on Azure. As the senior engineer, what has to be true before you agree it's production ready? Walk me through your production readiness checklist: observability, alerting and on-call, resilience, capacity, deployment and rollback, security and data, and operational documentation, and how you run the review without it becoming a box-ticking exercise.

Covers production readiness reviews: the checklist across observability, SLOs and alerting, on-call and runbooks, resilience and dependencies, capacity and load testing, deployment and rollback, security and privacy, data backup and restore, and how to run the review so it changes outcomes.

Senior Architecture Advanced azure deployment observability production production-readiness resilience

๐ŸŽฏ Key points

  • Readiness = the team can detect, diagnose and recover from failure without the authors in the room
  • Observability: OpenTelemetry metrics, traces and logs with trace ids; a service dashboard; SLIs and SLOs agreed
  • Alerting and on-call: SLO burn-rate alerts with owners and runbooks; a rotation that knows the service
  • Resilience via Microsoft.Extensions.Http.Resilience (AddStandardResilienceHandler): timeouts, retries, circuit breakers; liveness vs readiness probes; graceful shutdown
  • Capacity: load test to the expected peak × 2, autoscaling rules, quotas and limits checked
  • Deploy and rollback: automated pipeline, progressive rollout, tested rollback, backward-compatible migrations
  • Security and data: managed identity and Key Vault, Privacy Act data classification, backups with a tested restore (RPO/RTO)
  • Run it as a facilitated conversation with evidence, the whole team and the product owner, and a risk register, scaled to the tier

โฑ 30-second answer

A service is production ready when the team can detect, diagnose and recover from failure without the people who wrote it in the room. My checklist covers: observability (OpenTelemetry metrics, traces and logs, a dashboard, agreed SLOs); alerting and on-call (burn-rate alerts with owners and runbooks, a trained rotation); resilience (timeouts, retries and circuit breakers on every dependency, degradation, correct liveness and readiness probes, graceful shutdown); capacity (load tested to twice the expected peak, autoscaling and quotas); deployment (progressive rollout and a tested rollback, backward-compatible migrations); security and data (managed identity, Key Vault, data classification under the Privacy Act, backups with a tested restore).

I run it as a review with evidence, not ticks, scaled to the service's criticality. The trade-off is launch speed versus avoidable 3 am incidents.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"My definition is: production ready means the team can find out something is wrong before customers do, work out what it is, and recover, at 3 am, without the person who wrote it. So I go through the areas that make that true, and for each one I ask for evidence, not a yes. Observability: show me the dashboard, and show me a trace that goes from the API through SQL and the downstream call with the same trace id in the logs. SLOs: what are they, and who agreed them with the product owner? Alerting: show me the burn-rate alerts, who they page and the runbook each one links to. On-call: does the rotation know this service, and has someone outside the team done a game day with the runbooks?

Then failure. For every dependency: what's the timeout, is there a retry with backoff and a circuit breaker, and what does the user see when it's down? Are the liveness and readiness probes different, so a database outage doesn't make Kubernetes restart every pod? Does it shut down gracefully during deployments? Capacity: show me the load test at twice the expected peak and the autoscaling rule. Deployment: is rollback automated and has it been tested, and are the EF Core migrations backward compatible so the old version runs against the new schema? Security and data: managed identity, secrets in Key Vault, what personal information it stores and where, and when we last restored a backup. For example, at [company] I [ran readiness reviews for new services], and on [one payments service] the review found [the readiness probe checked SQL, so a 30-second database failover would have restarted every pod]; we fixed it before launch, and [the first real failover a month later caused no outage].

How I run it matters as much as the list. I scale it to the tier: a Tier 1 customer-facing service gets the full review; an internal tool gets a lighter one. Gaps don't automatically block launch; they go into a risk register with an owner, and the product owner accepts the risk explicitly or we fix it. The mistake I see is a checklist completed by the team in ten minutes the day before launch. It has to be a conversation with evidence, early enough to change things."


The checklist

Area What must be true Evidence I ask for
Observability OpenTelemetry metrics, traces and logs; trace ids in logs; service dashboard A live trace across dependencies; the dashboard
SLOs SLIs defined, SLO agreed with product, error budget policy The SLO document
Alerting Burn-rate alerts with owner, severity, runbook link Alert rules in code; a test page
On-call Rotation assigned, trained, runbooks verified Game day notes
Resilience Timeouts, retries with jitter, circuit breakers, fallbacks; bulkheads where needed Fault injection results (dependency down, slow)
Health and lifecycle Liveness (process alive) separate from readiness (can serve); graceful shutdown; start-up probe Probe config; a rolling deploy under load with no errors
Capacity Load tested to 2ร— expected peak; autoscaling; quotas (SQL DTU/vCores, Service Bus, subscription limits) Load test report
Deployment Automated pipeline, progressive rollout, automated and tested rollback, backward-compatible migrations A rollback rehearsal
Security Managed identity, Key Vault, least privilege, dependency scanning, pen test if Tier 1 Threat model; scan results
Data Data classification, Privacy Act / APP obligations, retention, backups with tested restore against RPO/RTO Last restore test
Docs Architecture overview, dependency list, runbooks, ownership Links

Scaling the review to the service

Tier Example Review depth
Tier 1 Checkout, payments, sign-in Full checklist, game day, load test, pen test, sign-off by product
Tier 2 Customer-facing but degradable (recommendations) Full checklist, lighter evidence
Tier 3 Internal tools, batch reports Observability, ownership, backups, deploy/rollback

Production example

A readiness review for a new payments service found three launch risks: the readiness probe depended on SQL (a failover would restart every pod), the HTTP client to the payment gateway had the default 100-second timeout, and nobody had restored the database from backup. All three were fixed in a week; a month after launch, an Azure SQL failover lasted 25 seconds and caused 40 failed requests instead of an outage.

๐Ÿ” What the interviewer is checking

Checks two things: that the candidate can judge operational risk across observability, resilience, capacity, deployment and data, and that they can lead a team to own that readiness rather than just tick a form.

Green flags

  • Frames readiness as detect, diagnose, recover without the authors
  • Covers probes, timeouts and circuit breakers, rollback and migrations, backups with restore tests
  • Asks for evidence and keeps a risk register with owners and product sign-off
  • Runs the review as a collaborative conversation that surfaces the team's own worries
  • Scales the review to service criticality; mentions paved-road templates

Red flags

  • Only lists "logging and unit tests"
  • Treats the checklist as a form to tick, or the review as an exam to pass
  • Never mentions rollback, restore, runbooks or on-call

๐Ÿ“š Learn in depth

1. What readiness is really about

Every item on the checklist serves one of three capabilities:

            detect                 diagnose                  recover
   SLOs, burn-rate alerts   dashboards, traces, logs   rollback, flags, scaling,
   synthetic tests          runbooks, ownership        failover, backups/restore
            โ”‚                       โ”‚                          โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ all without the original authors in the room โ”€โ”€โ”˜

If an item doesn't help one of these, it probably belongs elsewhere (code quality, architecture review).

2. Health probes done right

Probe Question Should check Should not check
Start-up Has it finished starting? Warm-up done, config loaded Downstream services
Liveness Is the process stuck beyond repair? That the app can answer at all The database, other services
Readiness Should it get traffic now? Critical local readiness; possibly a key dependency, carefully Optional dependencies

The classic failure: liveness checks SQL, SQL fails over for 30 seconds, every pod is killed and restarted at once, and the service is down for minutes instead of degraded for seconds. In ASP.NET Core, tag health checks and map separate endpoints with a Predicate.

3. Graceful shutdown

During a rolling deployment Kubernetes sends SIGTERM, removes the pod from endpoints (asynchronously), and kills it after terminationGracePeriodSeconds. The host stops accepting new requests and waits up to HostOptions.ShutdownTimeout (30 seconds by default since .NET 8) for in-flight work. A short preStop sleep covers the delay before endpoint removal reaches every load balancer; background services must honour the stopping token.

4. Resilience for every dependency

For each dependency, the readiness review asks four questions: timeout (shorter than the caller's), retry (only idempotent operations, with exponential backoff and jitter), circuit breaker (stop hammering a failing service), and fallback (what the user sees). Microsoft.Extensions.Http.Resilience's AddStandardResilienceHandler() gives sensible defaults (total timeout, retry, circuit breaker, attempt timeout) built on Polly v8. Prove it with fault injection: block the dependency in staging and watch the dashboard.

5. Capacity

Load test the realistic mix (not one endpoint) at expected peak and at 2ร—, ramping, for long enough to see GC and connection pool behaviour. Watch saturation signals: ThreadPool queue, connection pool usage, SQL CPU and waits, Service Bus throttling. Check hard limits that autoscaling can't fix: database tier, subscription and regional quotas in Australia East, SNAT ports for outbound connections, API rate limits of third parties.

6. Deploy and rollback

Rollback must be automated and rehearsed. The trap is the database: if the new version's migration drops or renames a column, the old version can't run. Use expand/contract migrations: add new columns first, deploy code that writes both, backfill, then remove the old column in a later release. Then rollback is just redeploying the previous image.

7. Data and privacy

Know what personal information the service holds, why, where (region), for how long, and who can access it, so APP obligations and a possible Notifiable Data Breach assessment are possible. Backups without a restore test are a hope: restore to a new database, check row counts and the time it took, and compare with the RPO and RTO the business agreed.

8. Running the review

  • Start it weeks before launch, as a template the team fills with evidence.
  • Hold a 60-minute review with the team, an SRE or senior from another team, and the product owner.
  • Classify gaps: launch blocker, launch with accepted risk (owner, date), later.
  • Revisit 30 days after launch with real incidents and alert data.

Try it yourself

  1. Write the readiness checklist for a service you own and fill in the evidence column honestly.
  2. In staging, make SQL unreachable for 60 seconds and watch what your probes do.
  3. Do a rolling deployment under load and count failed requests; then add a preStop delay and repeat.
  4. Restore last night's backup into a scratch database and time it.
  5. Block a downstream dependency with a network policy or Chaos Studio fault and check what the user sees.

๐Ÿ’ป Code

The readiness items that live in code: separate probes, graceful shutdown, resilience on dependencies, configuration validated at start-up, and telemetry.

// Program.cs (.NET 10) โ€” packages: OpenTelemetry.Extensions.Hosting + instrumentation, Microsoft.Extensions.Http.Resilience,
// AspNetCore.HealthChecks.SqlServer (community package) for the SQL check.
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

var builder = WebApplication.CreateBuilder(args);

// Fail fast at start-up on bad configuration, so a broken deploy never goes green.
builder.Services.AddOptions<PaymentGatewayOptions>()
    .BindConfiguration("PaymentGateway")
    .ValidateDataAnnotations()
    .ValidateOnStart();

// Every dependency gets timeouts, retries with jitter and a circuit breaker.
builder.Services.AddHttpClient<PaymentGatewayClient>()
    .AddStandardResilienceHandler(o =>
    {
        o.AttemptTimeout.Timeout = TimeSpan.FromSeconds(2);       // not the 100 s HttpClient default
        o.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(8);
    });

// Liveness must not depend on SQL; readiness can, carefully.
builder.Services.AddHealthChecks()
    .AddCheck("self", () => HealthCheckResult.Healthy(), tags: ["live"])
    .AddSqlServer(builder.Configuration.GetConnectionString("Payments")!, name: "sql", tags: ["ready"]);

// Give in-flight requests time to finish during rolling deployments.
builder.Services.Configure<HostOptions>(o => o.ShutdownTimeout = TimeSpan.FromSeconds(25));

builder.Services.AddOpenTelemetry()
    .WithMetrics(m => m.AddAspNetCoreInstrumentation().AddHttpClientInstrumentation().AddRuntimeInstrumentation().AddOtlpExporter())
    .WithTracing(t => t.AddAspNetCoreInstrumentation().AddHttpClientInstrumentation().AddOtlpExporter());

var app = builder.Build();

app.MapHealthChecks("/health/live", new HealthCheckOptions { Predicate = c => c.Tags.Contains("live") });
app.MapHealthChecks("/health/ready", new HealthCheckOptions { Predicate = c => c.Tags.Contains("ready") });
app.MapPost("/payments", (PaymentRequest req, PaymentGatewayClient gateway, CancellationToken ct) => gateway.ChargeAsync(req, ct));

app.Run();

public sealed class PaymentGatewayOptions
{
    [Required, Url] public string BaseUrl { get; init; } = "";
}

public sealed record PaymentRequest(string OrderId, decimal Amount);

public sealed class PaymentGatewayClient(HttpClient http)
{
    public async Task<IResult> ChargeAsync(PaymentRequest req, CancellationToken ct)
    {
        using var response = await http.PostAsJsonAsync("charges", req, ct);
        return response.IsSuccessStatusCode ? Results.Accepted() : Results.Problem(statusCode: 502);
    }
}
# Kubernetes probes and shutdown that match the code above
livenessProbe:   { httpGet: { path: /health/live,  port: 8080 }, periodSeconds: 10, failureThreshold: 3 }
readinessProbe:  { httpGet: { path: /health/ready, port: 8080 }, periodSeconds: 5,  failureThreshold: 2 }
startupProbe:    { httpGet: { path: /health/live,  port: 8080 }, periodSeconds: 5,  failureThreshold: 30 }
lifecycle:
  preStop: { sleep: { seconds: 5 } }   # let endpoint removal propagate before shutdown starts
terminationGracePeriodSeconds: 35      # > preStop + ShutdownTimeout

โš  Common mistakes

  • Mistake: Running the readiness review the day before launch. Why it is wrong: nothing found can be fixed, so it becomes a rubber stamp. Instead: start weeks earlier with evidence collected along the way.
  • Mistake: Ticks instead of evidence. Why it is wrong: "alerts: yes" often means one CPU alert nobody owns. Instead: ask to see the alert, the page and the runbook.
  • Mistake: Liveness probe checks the database. Why it is wrong: a short database failover makes Kubernetes kill every pod. Instead: liveness checks only the process; dependencies go in readiness, carefully.
  • Mistake: Default HttpClient timeouts and no circuit breaker. Why it is wrong: a slow dependency holds requests for 100 seconds and starves the service. Instead: AddStandardResilienceHandler with timeouts tuned per dependency.
  • Mistake: Rollback that has never been tried, or migrations that break the old version. Why it is wrong: the escape hatch fails during the incident. Instead: expand/contract migrations and a rehearsed rollback.
  • Mistake: Backups with no restore test. Why it is wrong: you discover missing permissions or a 6-hour restore during a disaster. Instead: scheduled restore tests measured against RPO and RTO.
  • Mistake: Treating runbooks and operational docs as optional "nice to have" items. Why it is wrong: on-call engineers who didn't build the service lose the first 20โ€“30 minutes of every incident working out what it is, which goes straight onto MTTR, and knowledge stays with the authors. Instead: runbooks per alert, an architecture and dependency page, and a game day by someone outside the team before launch.
  • Mistake: Load testing one endpoint at expected traffic. Why it is wrong: real peaks and mixes find pool and quota limits you missed. Instead: realistic mix at 2ร— peak, watching saturation signals.
  • Mistake: Same checklist for every service. Why it is wrong: internal tools drown in process while Tier 1 services get too little. Instead: tier the review.

๐Ÿ› Senior insight: trade-offs

The senior part isn't the checklist, which anyone can download; it's judgement about risk and how the review is run. I want gaps written down with an owner and either fixed or explicitly accepted by the product owner, because "we'll do it after launch" without a name means never. And I scale it: forcing a game day on an internal report generator wastes goodwill that I need for Tier 1 services.

I facilitate it as a blameless, curious conversation, not an audit. I ask open questions ("walk me through what happens when the gateway is slow", "what worries you most about launch?") and make sure the quietest engineers speak, because the person who wrote the retry code often knows the scariest gap and won't volunteer it if the review feels like an exam. Findings are framed as the team's risks, not the reviewer's verdict, and the team owns the fixes. Over time that builds a culture where teams ask for a review early instead of hiding from it.

Approach When it fits Cost When not to
Full review with game day and sign-off Tier 1, customer-facing, money or personal data Days of team effort Internal, low-impact tools
Lightweight checklist with evidence links Tier 2 / 3 services Hours Payments, sign-in
Platform "paved road" (templates with probes, telemetry, alerts built in) Many teams, many services Platform team investment One-off services
Post-launch review at 30 days Every service One meeting Never skip it

The best long-term move is to make readiness the default: a service template that already has OpenTelemetry, separate probes, AddStandardResilienceHandler on typed clients registered through DI, SLO alert templates and a runbook skeleton, so the review checks configuration rather than building from scratch.

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions SLO burn-rate alerts. Why: Checks they can design the alerting the checklist requires.
    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.

  2. When: Candidate mentions agreeing SLOs with the product owner. Why: Checks they can define the SLIs and SLOs a readiness review asks for.
    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 mentions ValidateOnStart, probes or rollback. Why: Checks they know how deployments fail at start-up and how to stop broken deploys going green.
    How to answer

    "Deployed" only means the artefact was copied; starting is a separate step that the pipeline often doesn't check. First I roll back (slot swap back or kubectl rollout undo). Then I get the startup exception: kubectl logs --previous and kubectl describe pod for the exit code and probe failures, or the App Service log stream for a 500.30. The usual causes are configuration (a missing or renamed key), secrets (a Key Vault reference failing because the managed identity lacks access), migrations run at startup, a missing native dependency in a slim image, or a port mismatch with the health probe (official ASP.NET Core images, including .NET 10's, listen on 8080, a change that arrived in .NET 8). The prevention is making startup part of the deployment: ValidateOnStart, readiness probes, slot warm-up or canaries, and a smoke test before promotion.

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

A readiness review that caught a liveness probe that would have turned a failover into an outage
Situation
A new payments service, .NET 10 on AKS in Australia East with Azure SQL (zone-redundant) and an external payment gateway, due to launch for [a major retail client] in [three weeks]. Tier 1: it handled [~$2M] a day.
Signals
No incident yet: the review itself was the signal. The team's self-assessed checklist was all ticks. Evidence requests showed: liveness probe calling `/health` which included the SQL check; the gateway `HttpClient` used the default 100-second timeout; no one had restored a backup; load test covered only `POST /payments` at expected volume.
Investigation
In staging we forced an Azure SQL failover: liveness failed on every pod within [20 seconds] and Kubernetes restarted all [6] at once, giving [~3 minutes] of total outage. Fault injection on the gateway (Chaos Studio latency fault) showed requests piling up for 100 seconds and the ThreadPool queue climbing. A restore test took [2 h 40 min] against an agreed RTO of [1 hour].
Resolution
Split liveness and readiness probes (SQL only in readiness), added `AddStandardResilienceHandler` with a 2-second attempt timeout and circuit breaker, a fallback that queued payments for retry, and moved the database to a tier and backup configuration that restored in [35 minutes]. Re-ran the load test with the real mix at 2× peak.
Prevention
Readiness template adopted for all Tier 1 services with an evidence column; a service template with separate probes and resilience handlers by default; quarterly restore tests; a 30-day post-launch review. A month after launch a real SQL failover caused [40] failed requests and no outage.

How to tell it (STAR)

**S:** At [company] we were [three weeks] from launching a payments service handling [about $2M a day], and the team's readiness checklist was all ticks. **T:** As [the senior engineer / reviewer], I had to decide whether it was actually ready. **A:** I asked for evidence instead of ticks and we tested the riskiest items in staging. A forced SQL failover made every pod fail its liveness probe and restart together, the gateway client had a 100-second timeout, and a restore took nearly three hours against a one-hour RTO. We split the probes, added resilience handlers with a fallback, fixed the restore path and re-ran a realistic load test. Gaps we couldn't fix went into a risk register the product owner signed. **R:** We launched on time, and when a real SQL failover happened a month later it caused [40] failed requests instead of [a multi-minute outage]; the template became standard for Tier 1 services.

โ†ฉ Usually asked after

More in Production Tools

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

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