Azure Well-ArchitectedComplete guide

WAF: Reliability

The Reliability pillar focuses on resiliency, availability, recovery, and the workload's ability to return to a functioning state after failure. This guide connects the programming model to production decisions, failure modes, security, testing, performance, deployment, and operations.

Overview

Reliable design begins with business requirements and critical flows, then translates them into availability targets, recovery time objectives, recovery point objectives, and service-level indicators. Teams use redundancy, fault isolation, retries, timeouts, health models, backups, disaster recovery, and controlled fault testing to meet those targets. Simplicity matters: every resilience mechanism adds state, cost, dependencies, and failure modes that operators must understand. The central design goal is defining reliability requirements, failure modes, redundancy, recovery, graceful degradation, and operational learning for critical Azure workload flows. Reliability is an end-to-end workload property; choosing an availability-zone-capable service does not create a reliable user journey by itself. Teams should begin with a concrete user outcome and quality-attribute scenario, choose the smallest architecture that satisfies it, and record the operational owner. Undefined SLOs and recovery objectives lead teams to buy redundancy without knowing whether failover, data recovery, dependencies, and operations meet the business need. A production design therefore needs explicit limits, identity, cancellation, telemetry, evaluation, recovery, and a safe change path. The dedicated sample keeps external infrastructure optional so readers can inspect the governing mechanics locally, then maps those mechanics to the hosted services and controls required in a real environment.

Official resources

What you will learn

  • Explain the purpose and boundaries of WAF: Reliability without confusing the tool with the whole architecture.
  • Decide when WAF: Reliability is appropriate and when a simpler design is safer.
  • Design the core contracts, ownership, data flow, and failure behavior for defining reliability requirements, failure modes, redundancy, recovery, graceful degradation, and operational learning for critical Azure workload flows.
  • Apply authentication, authorization, validation, privacy, and least privilege at every trust boundary.
  • Test normal behavior, negative paths, dependency failure, recovery, and operational signals.
  • Deploy incrementally with observable acceptance criteria, rollback, and accountable ownership.
  • Run and extend the dedicated WAF Reliability Budget sample.

Prerequisites

  • .NET 10, C# async programming, dependency injection, configuration, and structured logging.
  • The domain and platform fundamentals referenced by WAF: Reliability.
  • Basic security, testing, observability, and continuous-delivery concepts.
  • A .NET 10 SDK to run WAF Reliability Budget; no paid cloud account is required for its default path.

When to use WAF: Reliability

Good fit

  • Use WAF: Reliability when defining reliability requirements, failure modes, redundancy, recovery, graceful degradation, and operational learning for critical Azure workload flows directly addresses a measured product or operational need.
  • Use it when a named team can own the contracts, data, deployment, telemetry, cost, and incident response.
  • Introduce it behind a narrow boundary and prove the riskiest assumption with a production-shaped experiment.

Choose another approach when

  • Avoid WAF: Reliability when the same outcome is available through a smaller in-process or managed capability.
  • Do not adopt it only for résumé value, diagram symmetry, or a vendor checklist.
  • Do not proceed without a threat model, failure policy, observability, and an exit or rollback path.

Key concepts

Targets and critical flows

Availability SLOs, RTO, RPO, and dependency objectives must be derived from business impact for the flows that matter most.

Redundancy and fault isolation

Availability zones, scale units, partitioning, and independent failure domains reduce the blast radius of component or datacenter failures.

Self-healing and recovery

Timeouts, bounded retries, circuit breakers, health endpoints, failover, backups, and tested restore procedures return service safely.

Failure testing

Load tests, chaos experiments, game days, and disaster-recovery drills verify assumptions before an uncontrolled incident does.

SLO and error budgets

SLO and error budgets is a first-class design concern for defining reliability requirements, failure modes, redundancy, recovery, graceful degradation, and operational learning for critical Azure workload flows.

Failure-mode and recovery design

Failure-mode and recovery design is a first-class design concern for defining reliability requirements, failure modes, redundancy, recovery, graceful degradation, and operational learning for critical Azure workload flows.

Architecture

Traffic is routed across isolated instances while health signals, resilience policies, and recovery data support detection, failover, and restoration.

Global routing
Zone-redundant service
Resilient dependencies
Backup + recovery

Conceptual architecture · Adapt to your system context

Implementation walkthrough

Build the critical path deliberately, then verify its observable behavior.

  1. 01

  2. 02

  3. 03

  4. 04

  5. 05

  6. 06

  7. 07

Code example

ASP.NET Core health checks and the standard HTTP resilience handler provide observable readiness plus bounded retries, timeouts, and circuit breaking for an outbound dependency.

Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddHealthChecks()
    .AddCheck<OrdersReadinessCheck>("orders-ready");

builder.Services.AddHttpClient<InventoryClient>(client =>
    client.BaseAddress = new Uri(builder.Configuration["Inventory:Url"]!))
    .AddStandardResilienceHandler();

var app = builder.Build();
app.MapHealthChecks("/health/live", new()
{
    Predicate = _ => false
});
app.MapHealthChecks("/health/ready");
app.Run();

Testing strategy

Test WAF: Reliability as a behavior and operational boundary, not only as a library call.

  • Unit-test deterministic policy, validation, mapping, and error classification.
  • Use contract tests for provider, protocol, platform, and downstream boundaries.
  • Run integration tests with realistic serialization, configuration, identity, cancellation, and dependency behavior.
  • Exercise the primary failure: Undefined SLOs and recovery objectives lead teams to buy redundancy without knowing whether failover, data recovery, dependencies, and operations meet the business need.
  • Load-test representative and adversarial inputs while observing latency, errors, saturation, and cost.
  • Keep a versioned acceptance suite that protects behavior during dependency and configuration changes.

Security considerations

Treat WAF: Reliability input, dependencies, credentials, output, and administrative controls as separate trust boundaries.

  • Authenticate the caller and workload; authorize the operation and resource at the system that performs it.
  • Validate type, size, count, format, tenant, and allowed values before expensive or consequential work.
  • Use short-lived identity and least privilege; keep secrets out of source, logs, prompts, packages, and client storage.
  • Classify data, minimize collection and retention, redact telemetry, encrypt in transit and at rest, and support deletion policy.
  • Require explicit approval and idempotency for external side effects; audit actor, intent, policy decision, and outcome.
  • Patch and inventory dependencies, pin trusted sources, scan artifacts, and restrict outbound destinations.

Performance and scalability

Optimize the end-to-end user outcome within downstream capacity and cost limits.

  • Measure p50, p95, p99, throughput, failures, saturation, queue time, payload size, and cost together.
  • Set end-to-end deadlines and propagate cancellation instead of stacking independent timeouts.
  • Bound concurrency, queues, retries, payloads, fan-out, and caches so overload cannot grow without limit.
  • Cache only when identity, freshness, privacy, invalidation, and failure semantics are explicit.
  • Batch or stream only when the workload and user latency target justify the complexity.
  • Capacity-test dependency degradation and recovery because retry and replay traffic often dominate peak load.

Deployment and operations

Promote an immutable, observable change through environments with compatibility and rollback evidence.

  • Keep environment configuration external, validated at startup, and free of long-lived credentials.
  • Provision dependencies, identity, network policy, dashboards, alerts, and budgets through reviewed automation.
  • Use additive contracts and mixed-version compatibility before removing old behavior.
  • Deploy with canary or staged exposure, health gates, graceful shutdown, and automated rollback signals.
  • Record version and configuration in telemetry; retain runbooks, ownership, recovery targets, and escalation paths.
  • Rehearse dependency loss, restore, credential rotation, region or device failure, and data recovery where applicable.

Common problems and fixes

The local sample works but production behavior differs

Likely cause: Provider, identity, network, limits, data, or configuration assumptions were hidden.

Fix: Compare effective configuration and correlated dependency telemetry, then reproduce the smallest differing boundary.

Latency rises sharply under load

Likely cause: Concurrency, fan-out, retries, queues, or a downstream quota is unbounded.

Fix: Inspect saturation and queue time, stop retry amplification, apply backpressure, and reduce work per request.

A request succeeds twice or creates duplicate effects

Likely cause: The caller retried after an ambiguous result and the operation was not idempotent.

Fix: Use a stable operation ID, persist the outcome with the effect, and return the recorded result on replay.

Sensitive information appears in telemetry

Likely cause: Raw inputs, outputs, headers, or exceptions were logged without classification and redaction.

Fix: Stop the leak, restrict and rotate access as needed, redact by default, and test the telemetry schema.

A dependency upgrade changes behavior

Likely cause: Application semantics depended on provider-specific defaults or an untested protocol detail.

Fix: Pin or roll back, compare release notes and contract traces, then update the acceptance suite before retrying.

Operators cannot explain a failed user outcome

Likely cause: Logs, metrics, traces, version, and business identifiers are not correlated.

Fix: Add end-to-end correlation and a dashboard that links the user journey to dependency and deployment signals.

Best practices

  • Set reliability targets per critical flow and include dependency availability in the end-to-end model.
  • Prefer bounded retries with jitter and idempotent operations; combine them with timeouts and circuit breaking to avoid retry storms.
  • Use availability zones or regions only when business targets justify the extra cost and operational complexity, and test failover regularly.
  • Back up data according to RPO, restore according to RTO, and prove both through automated validation and scheduled recovery drills.
  • Define SLIs and SLOs for critical flows, calculate error budgets, and connect burn-rate alerts to an owned response.
  • Set RTO, RPO, maximum tolerable outage, and data-consistency expectations; then prove them with restore and failover exercises.

Production checklist

  • The need for WAF: Reliability, alternatives, owner, constraints, and exit criteria are recorded.
  • Contracts, data ownership, trust boundaries, limits, and compatibility policy are explicit.
  • Identity, least privilege, validation, privacy, redaction, audit, and side-effect approval are enforced.
  • Timeout, cancellation, retry, backpressure, idempotency, fallback, and recovery behavior are tested.
  • Logs, metrics, traces, cost, quality, business outcomes, dashboards, alerts, and runbooks identify version and owner.
  • Capacity, dependency failure, restore, rollback, credential rotation, and incident response are rehearsed.
  • Lifecycle, deprecation, data retention, dependency patching, and operational cost have named owners.

Common interview questions

How does designing for 99.9% availability differ from 99.99%?

99.99% allows roughly one tenth of the downtime of 99.9%, often requiring stronger redundancy, faster detection and recovery, fewer maintenance interruptions, stricter dependency targets, more automation, and higher cost.

What is the difference between RTO and RPO?

RTO is the maximum acceptable time to restore a service after disruption. RPO is the maximum acceptable data-loss window measured backward from the failure.

Why can retries make an outage worse?

Unbounded or synchronized retries multiply traffic against a failing dependency, exhaust resources, and delay recovery. Retries need limits, backoff, jitter, time budgets, and idempotency.

What is an error budget?

The allowed unreliability implied by an SLO; it provides a shared quantitative limit for release risk and reliability work.

Why is redundancy insufficient?

Dependencies, state replication, routing, health detection, failover logic, capacity, and operator action must all work within the recovery target.

Dedicated GitHub sample

Clone, run, test, and modify the focused implementation created for this guide.

Verified sample

WAF Reliability Budget

A .NET 10 SLO calculator that derives monthly error budget, measures consumption, and raises fast- and slow-burn alerts.

.NET 10WAF Reliability Budget
dedicated-samplebatch-21azure-waf-reliability
Run
dotnet run --project src/WafReliabilityBudget
Test
dotnet run --project src/WafReliabilityBudget -- --self-test