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

๐Ÿ“š Interview question

Your product manager says the new platform must have "five nines". What does that actually mean? Explain how availability is measured, how serial and parallel dependencies combine, what downtime 99.9%, 99.95% and 99.99% allow per month, and how you would design to hit a realistic target on Azure.

Availability maths for system design: the nines and allowed downtime, composite availability for serial and parallel dependencies, redundancy across zones and regions, SLA vs SLO, MTTR and MTBF, and designing to a realistic Azure target.

Senior Theory Advanced availability azure redundancy sla slo system-design

๐ŸŽฏ Key points

  • Availability = good time (or good requests) ÷ total; measure it as a request-based SLI from the user's side
  • Downtime budgets per 30-day month: 99.9% ≈ 43 min, 99.95% ≈ 22 min, 99.99% ≈ 4.3 min, 99.999% ≈ 26 s
  • Serial dependencies multiply: 99.95% × 99.99% × 99.9% ≈ 99.84%; every hard dependency lowers the ceiling
  • Parallel redundancy: 1 − (1 − a)^n, only if failures are independent (zones, not two VMs in one rack)
  • Availability ≈ MTBF ÷ (MTBF + MTTR); at four nines, recovery must be automatic because humans are too slow
  • Azure SLAs are financial credits, not guarantees; check current figures (e.g. zone-redundant Azure SQL Business Critical 99.995%)
  • Raise availability by removing hard dependencies: caches, queues, graceful degradation, multi-zone, then multi-region
  • Each extra nine roughly multiplies cost and complexity; agree the target per user journey, not per system

โฑ 30-second answer

Availability is the fraction of time โ€” or better, of requests โ€” that succeed. The nines translate to a monthly downtime budget: 99.9% โ‰ˆ 43 minutes, 99.95% โ‰ˆ 22 minutes, 99.99% โ‰ˆ 4.3 minutes, and 99.999% โ‰ˆ 26 seconds. Serial dependencies multiply: an app at 99.95% that needs a database at 99.99% and a payment API at 99.9% can't beat ~99.84%. Parallel redundancy gives 1 โˆ’ (1 โˆ’ a)โฟ, but only for independent failures, which is why zones and regions matter. Availability is also MTBF รท (MTBF + MTTR), so above 99.95% recovery must be automated. Cloud SLAs are credit promises, not engineering guarantees. The trade-off: each extra nine roughly multiplies cost and complexity, so I set targets per user journey.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"I'd start by translating the nines into minutes, because that changes the conversation. Over a 30-day month, 99.9% is about 43 minutes of downtime, 99.95% is about 22, 99.99% is about four and a half, and five nines is 26 seconds โ€” less than one deployment rollback. Then I'd ask: availability of what, measured how? I measure it as a request-based SLI: good requests over valid requests at the load balancer or from synthetic checks, per user journey. Checkout and login might need 99.95%; the monthly report can live with 99.5%.

Then the maths. Hard dependencies in series multiply. If the API on App Service is 99.95%, Azure SQL zone-redundant Business Critical is 99.995% and a payment provider is 99.9%, checkout can't do better than roughly 99.84%, before our own bugs. Redundancy in parallel adds nines: two independent copies at 99.9% give 1 โˆ’ 0.001ยฒ, about 99.9999% โ€” but only if they fail independently, which is why I spread across availability zones in Australia East rather than run two instances in one. For example, at [company] we [had a 99.95% target for an ordering API and kept missing it because of a synchronous call to a loyalty service]. I [made the loyalty call asynchronous through Service Bus with a cached fallback], [and measured availability went from 99.82% to 99.97% over the next quarter].

The mistake I see is treating vendor SLAs as engineering numbers. An Azure SLA is a promise of service credits, not a guarantee of uptime, and it doesn't count your own deploys and bugs, which cause most outages. The other lever is MTTR: availability is MTBF over MTBF plus MTTR, and at four nines you can't wait for a human to wake up. So when someone asks for five nines, I tell them the cost, offer four nines on the critical journey, and design out the hard dependencies first."


Downtime budgets

Target Per 30-day month Per year What it implies
99% 7.2 h 3.65 days Single instance, manual recovery
99.9% 43.2 min 8.76 h Redundant instances, tested deploys
99.95% 21.6 min 4.38 h Zone redundancy, automated failover
99.99% 4.3 min 52.6 min Multi-zone everything, automatic recovery, safe deploys, often multi-region
99.999% 26 s 5.3 min Active-active multi-region, cell architecture, very expensive

Arithmetic: 30 days ร— 24 h ร— 60 min = 43,200 min; ร— (1 โˆ’ 0.999) = 43.2 min.

Composite availability

Structure Formula Example
Serial (all required) aโ‚ ร— aโ‚‚ ร— โ€ฆ 0.9995 ร— 0.99995 ร— 0.999 โ‰ˆ 0.9984
Parallel (any one enough) 1 โˆ’ โˆ(1 โˆ’ aแตข) two regions at 0.9995 โ†’ 1 โˆ’ 0.0005ยฒ โ‰ˆ 0.99999975 (before failover risk)
With failover parallel ร— failover success rate Failover that works 95% of the time caps the gain

Ways to raise it

Lever Effect Cost
Remove hard dependencies (cache, queue, fallback) Takes terms out of the product Eventual consistency, degraded UX
Zone redundancy Independent failure within a region Usually modest extra cost
Multi-region (Australia East + Southeast) Survives a regional outage Data replication, failover testing, 2ร— cost
Lower MTTR (auto-healing, fast rollback, feature flags) Shorter outages Engineering and tooling
Safer change (canary, blue-green) Fewer self-inflicted outages Pipeline work

SLA figures must be checked against the current Microsoft SLA pages; as of November 2026, Microsoft lists 99.995% for zone-redundant Azure SQL Business Critical and 99.99% for non-zone-redundant configurations.

Production example

An ordering API with a 99.95% SLO had five hard dependencies; the calculated ceiling was 99.86%, matching what we measured. Making two dependencies asynchronous and caching a third raised the ceiling to 99.97%, and canary deployments cut self-inflicted downtime from [~40] to [~8] minutes a quarter.

๐Ÿ” What the interviewer is checking

Checks whether the candidate can turn an availability target into numbers and design consequences, rather than repeating marketing terms.

Green flags

  • Converts nines into minutes per month correctly
  • Multiplies serial dependencies and explains independence for redundancy
  • Uses MTTR and request-based SLIs
  • Pushes back on unrealistic targets with cost and offers per-journey targets

Red flags

  • Believes a cloud SLA guarantees uptime
  • Adds a second region as the first answer
  • Can't do the basic arithmetic

๐Ÿ“š Learn in depth

1. Two ways to measure

  • Time-based: minutes the service was 'up' รท total minutes. Simple, but hides partial outages.
  • Request-based: successful valid requests รท valid requests. Captures partial failures and is what SLOs usually use.

A 10-minute outage at 3 a.m. and a 10-minute outage at peak are the same time-based but very different request-based.

2. Serial dependencies

user -> Front Door -> API -> SQL
         99.99%     99.95%  99.995%
composite = 0.9999 x 0.9995 x 0.99995 โ‰ˆ 0.99935  (โ‰ˆ 28 min/month)

Every hard dependency reduces the ceiling. The number of hard dependencies on a critical path is a design smell to count.

3. Parallel redundancy and independence

          +-> zone 1 instance (99.9%)
LB  ------+-> zone 2 instance (99.9%)     P(all down) = 0.001^3 = 1e-9
          +-> zone 3 instance (99.9%)

The formula assumes independence. Correlated failures โ€” the same bad deploy to all instances, a shared config store, a regional DNS problem โ€” break it. That's why most real outages come from change, not hardware.

4. MTBF and MTTR

Availability โ‰ˆ MTBF / (MTBF + MTTR). With one failure a month (MTBF โ‰ˆ 43,200 min):

MTTR Availability
60 min 99.86%
15 min 99.97%
2 min 99.995%

At four nines, detection plus recovery must take a few minutes: health probes, automatic instance replacement, automatic rollback.

5. Error budgets

An SLO of 99.95% gives a budget of 0.05% of requests. Spend it on releases and experiments; when it's gone, freeze risky changes. This makes availability a negotiated product decision.

6. Region pairs in Australia

Australia East (Sydney) has availability zones; Australia Southeast (Melbourne) is its paired region. Multi-region designs must handle data replication (active geo-replication or failover groups for Azure SQL, multi-region writes for Cosmos DB) and data residency โ€” both stay inside Australia.

7. Try it yourself

  1. List every hard dependency of one critical journey in a system you know, with its SLA, and compute the ceiling.
  2. Write a 10-line function that computes serial and parallel composites and test it with your numbers.
  3. Pull a month of request logs from Application Insights and compute request-based availability with a KQL query (requests | summarize ok = countif(success) * 1.0 / count()).
  4. Run a chaos experiment with Azure Chaos Studio that stops one zone's instances and measure the error rate during failover.
  5. Measure your real MTTR from the last five incidents and see what availability it supports.

๐Ÿ’ป Code

A tiny calculator for composite availability and downtime budgets, useful in design docs and tests.

namespace Reliability;

public static class Availability
{
    private static readonly TimeSpan Month = TimeSpan.FromDays(30);

    // All dependencies are required: availabilities multiply.
    public static double Serial(params ReadOnlySpan<double> parts)
    {
        var result = 1.0;
        foreach (var a in parts) result *= a;
        return result;
    }

    // Any one replica is enough: 1 - P(all fail). Assumes independent failures.
    public static double Parallel(double each, int replicas) =>
        1 - Math.Pow(1 - each, replicas);

    public static TimeSpan MonthlyBudget(double target) => Month * (1 - target);
}

// var checkout = Availability.Serial(0.9999, 0.9995, 0.99995, 0.999);  // โ‰ˆ 0.99835
// Availability.MonthlyBudget(checkout);                                 // โ‰ˆ 71 minutes
// Availability.Parallel(0.999, 3);                                      // โ‰ˆ 0.999999999

Measuring request-based availability from Application Insights:

requests
| where timestamp > ago(30d) and name startswith "POST /checkout"
| summarize total = count(), good = countif(success == true and duration < 2s)
| extend availability = round(100.0 * good / total, 3)

โš  Common mistakes

  • Mistake: Quoting "five nines" without the downtime budget. Why it is wrong: 26 seconds a month is less than one rollback; stakeholders rarely mean that. Instead: Translate every target into minutes per month and agree it per journey.
  • Mistake: Treating a vendor SLA as the system's availability. Why it is wrong: SLAs are credit promises for one service; they exclude your code, deploys and other dependencies, and the figures change, so always check the current Microsoft SLA page. Instead: Compute the composite and measure real request-based availability.
  • Mistake: Adding replicas that fail together. Why it is wrong: Parallel maths assumes independence; same zone, same deploy or same config store fail as one. Instead: Spread across zones, deploy progressively, and remove shared single points.
  • Mistake: Ignoring MTTR. Why it is wrong: At high targets, slow detection and manual recovery use the whole budget. Instead: Use the platform's automatic recovery (health checks, auto-heal, probes, automatic failover) plus automated rollback.
  • Mistake: Splitting into microservices with synchronous calls and expecting higher availability. Why it is wrong: Each service-to-service call is another term in the serial product. Instead: Keep critical paths short and make cross-service steps asynchronous.
  • Mistake: Measuring time-based availability from a single ping. Why it is wrong: It misses partial failures and slow responses. Instead: Use request-based SLIs with a latency threshold.
  • Mistake: Going multi-region before removing hard dependencies. Why it is wrong: It doubles cost and adds failover risk while the real outages come from in-region dependencies and deploys. Instead: Fix dependencies and zones first, then add a region if the business case holds.

๐Ÿ› Senior insight: trade-offs

Availability is a negotiation about money and user impact. Seniors bring three things: the downtime budget in minutes, the composite ceiling from the dependency chain, and the honest observation that most downtime is self-inflicted. The best availability investment is often fewer hard dependencies and faster rollback, not a second region. Architecture matters too: splitting a monolith into microservices that call each other synchronously turns one dependency into many and lowers the ceiling, unless the calls become asynchronous. Use the platform's automatic recovery to cut MTTR โ€” App Service health check and auto-heal, Container Apps and AKS liveness and readiness probes, Azure SQL automatic failover โ€” and measure what it actually achieves in a chaos test.

Target When it fits Rough cost When not to
99.9% Internal tools and back-office: an HR leave app, an admin portal, a nightly reporting service Baseline Revenue-critical public journeys
99.95% Most customer-facing APIs: product catalogue, customer account pages Zone redundancy, safe deploys When a cheaper target meets the business need
99.99% Revenue or safety-critical journeys: checkout and payments, login, clinical systems Multi-zone, often multi-region, on-call maturity Teams without automated recovery
99.999% Rare: telco, core banking rails Active-active cells, big team Almost every SaaS product

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions zones, regions or graceful degradation Why: Checks they can turn the availability target into a fault-tolerance design
    How to answer

    Fault tolerance means the system keeps working, perhaps degraded, when parts fail. I design it in layers:

    • Redundancy: no single points of failure โ€” multiple instances, zone-redundant services in Australia East, and regional failover to Australia Southeast if the RTO/RPO justify it.
    • Containment: timeouts on every call, retries with backoff and jitter for idempotent operations, circuit breakers and bulkheads so one slow dependency can't exhaust everything.
    • Degradation: fall back to cached data or turn off non-critical features.

    Then I prove it with chaos tests and failover drills. The trade-off is cost and complexity versus downtime: zone redundancy is cheap, multi-region active-active is expensive, so the availability target decides.

  2. When: Candidate mentions SLOs or error budgets Why: Checks they can define SLIs and run an error budget in practice
    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 load balancers and health checks Why: Checks they know how health checks and failover actually remove a bad instance
    How to answer

    A load balancer spreads traffic across healthy instances.

    • Layer 4 (TCP/UDP: Azure Load Balancer, AWS NLB, Kubernetes Services via kube-proxy) picks a backend per connection using IPs and ports. Fast, protocol-agnostic, no HTTP awareness.
    • Layer 7 (HTTP: App Gateway, ALB, Front Door, ingress controllers, Envoy, YARP) picks per request, can route by path/host/header, terminate TLS, retry and add headers.

    Health checks remove unhealthy instances (in Kubernetes: readiness for traffic, liveness for restarts). Algorithms: round robin, least connections/requests, hashing. Sticky sessions pin a user to one instance, which hurts scaling and failover. Connection draining stops new traffic to an instance before shutdown so in-flight requests finish.

    gRPC uses long-lived HTTP/2 connections, so an L4 balancer balances connections, not calls: one client connection carries all its calls to one pod. Use L7 balancing (mesh/Envoy) or client-side load balancing.

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

A 99.95% SLO kept failing because of one synchronous dependency
Situation
[Food ordering] API on [App Service] in Australia East with a [99.95%] SLO, [~400 req/s] at dinner peak, five hard dependencies including a [loyalty points] service.
Signals
Monthly availability reports at [99.82%]; error spikes correlated with loyalty service incidents; burn-rate alerts firing two or three times a month.
Investigation
Listed the dependency chain from the Application Insights application map and computed a 99.86% theoretical ceiling; grouped failed requests by dependency to find that [60%] of failures came from loyalty timeouts; reviewed incidents for MTTR ([35 min] average).
Resolution
Immediately set a 1 s timeout with a fallback that queued the points award. Then made loyalty awards asynchronous via Service Bus, cached the points balance, enabled zone redundancy and added automatic slot swap rollback on failed health checks.
Prevention
A dependency budget in the design template (every hard dependency needs a justification), composite availability in the ADR, multi-window burn-rate alerts, and a quarterly Chaos Studio experiment.

How to tell it (STAR)

**S:** Our [food ordering] API kept missing its [99.95%] SLO. **T:** I needed to find why and fix it without a big rebuild. **A:** I computed the composite ceiling from our five hard dependencies and showed we couldn't hit the target even on a perfect month; most failures came from the loyalty call. I made that call asynchronous with a cached fallback, turned on zone redundancy and automated rollback. **R:** Measured availability went from [99.82%] to [99.97%] over the next quarter and burn-rate pages dropped to [one] a month.

More in Senior Design Focus

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

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