Skip to main contentSkip to user menuSkip to navigation

Chaos Engineering

Design bounded chaos experiments with steady-state evidence, abort conditions, failure injection, and resilient recovery policies.

35 min readAdvanced
Not Started
Loading...

What is chaos engineering?

Chaos engineering is the discipline of experimenting on a system to build confidence that it can withstand disruptive conditions. A team declares normal, user-visible behavior, predicts that behavior will continue during a specific fault, injects the fault within a bounded scope, and compares the evidence with the prediction.

The core invariant is simple: an experiment must test a falsifiable system behavior without creating more risk than its safety envelope permits. Random breakage, unmeasured fault injection, and an outage without a hypothesis are not chaos engineering.

Chaos experiments complement unit, integration, load, disaster-recovery, and incident response tests. They answer a different question: when a realistic disturbance reaches the running system, do its defenses produce the outcome we promised?

Measure output

Steady state

Define normal behavior with a customer or system output such as successful checkouts, p95 latency, completed jobs, or queue age. Component health can support the diagnosis, but it is not the hypothesis by itself.

Create evidence

Fault variable

Inject one realistic condition: instance loss, dependency latency, connection reset, expired credentials, full disk, traffic pressure, or loss of a failure domain.

Contain risk

Safety envelope

Bound targets, traffic, time, permissions, abort conditions, cleanup, and accountable operators before the experiment starts.

Turn an assumption into a falsifiable experiment

A useful experiment begins with a claim about observable behavior, not with a tool action. “Terminate a pod” is a fault. “Checkout success stays at or above 99% when one replica disappears” is a hypothesis.

  1. 1

    Baseline

    Measure normal behavior

    Choose a short, representative window and record the customer-facing output, traffic shape, release, topology, and existing alerts.

  2. 2

    Prediction

    State the hypothesis

    Name the fault, target, expected steady-state boundary, and recovery behavior in a form that evidence can prove wrong.

  3. 3

    Guardrail

    Define the abort boundary

    Set a stricter customer-impact threshold that stops the fault. The hypothesis boundary and abort boundary serve different purposes.

  4. 4

    Evidence

    Run, observe, recover

    Inject the bounded fault, compare control and experiment behavior, remove the fault, and verify recovery before declaring the run complete.

A complete contract names every decision

  • Steady-state metric: the system output expected to remain acceptable.
  • Fault and target: the specific disruption and the resources eligible to receive it.
  • Blast radius: the maximum traffic, tenants, instances, or failure domains exposed.
  • Duration: the bounded injection window and total observation window.
  • Hypothesis boundary: the value that distinguishes held from falsified.
  • Abort condition: the value that stops the fault to protect users or the system.
  • Recovery proof: the metrics, queues, replicas, and side effects checked after cleanup.

The Principles of Chaos Engineering frame the practice around measurable steady state, realistic events, continuous experimentation, and a minimized blast radius.

Design the evidence and safety envelope together

Use the lab to separate three legitimate outcomes:

  • The hypothesis holds for the selected conditions.
  • The hypothesis is falsified inside the safety envelope, creating useful remediation work.
  • The abort boundary is crossed, requiring immediate stop, cleanup, and recovery verification.

The fourth outcome is not legitimate: crossing an abort boundary without an automatic or dependable manual stop.

Loading experiment contract

Preparing the hypothesis and safety boundaries...

Keep fault authority narrower than application authority

  • Target only explicitly onboarded or tagged resources, and preview resolved targets before a run when the platform supports it.
  • Grant the experiment identity only the fault actions it needs; separate permission to create a template from permission to start it.
  • Use automatic stop conditions for time-sensitive boundaries. A dashboard watched by an operator is useful context, not equivalent automation.
  • Make cleanup idempotent and verify the target returned to its intended state.
  • Keep an owner, communication channel, runbook, and manual stop path available for the entire observation window.

AWS Fault Injection Service templates define targets, actions, stop conditions, and an experiment role. Its stop conditions use CloudWatch alarms to stop a running experiment when a declared threshold is reached.

Bound one AWS FIS instance-loss experiment

Replace every placeholder account, role, alarm, tag, Region, and action with environment-specific values. Confirm the current action contract, resource behavior, and cleanup semantics before execution.

Trace how a local fault becomes a user-visible failure

Fault injection changes a component. Resilience controls determine whether the change remains local or propagates through the request path.

Dependency failure propagation

A bounded policy interrupts the amplification loop between a slow dependency and the calling service.

Demand

Caller traffic

Fresh requests enter while earlier requests may still be waiting. The arrival rate does not slow down merely because a dependency has degraded.

Failure policy

Dependency client

Timeouts bound waiting, breakers limit repeated calls, bulkheads isolate capacity, and fallbacks preserve only the product behavior they were designed to support.

Amplification

Shared resources

Workers, connections, queues, CPU, and retry budgets turn a local slowdown into a wider incident when they remain occupied or duplicate work.

Steady state

User outcome

Success, latency, correctness, and recovery time reveal whether the system contained the fault. A healthy process count alone cannot answer that question.

Controls protect different boundaries

  • Timeouts limit how long one attempt can consume a request budget.
  • Retries can recover transient faults, but require backoff, jitter, a retry budget, and an idempotency decision.
  • Circuit breakers stop repeated calls after evidence of failure and admit limited probes during recovery.
  • Bulkheads keep one dependency or tenant from consuming every shared worker or connection.
  • Fallbacks preserve a specific degraded product behavior; they do not make stale, missing, or fabricated data correct.
  • Capacity reserve and failure-domain placement keep surviving paths able to absorb rerouted work.

Compare containment policies with recorded evidence

The same injected fault can produce different system outcomes. Select a scenario and a response policy, then inspect the fixture's success, latency, worker pressure, retry amplification, and user-visible result.

Loading failure drill

Preparing recorded experiment outcomes...

Read the result without hiding trade-offs

  • A fast error can protect capacity while still violating the product's success objective.
  • A high success percentage can hide an unsafe latency or saturation boundary.
  • A fallback can preserve continuity while weakening freshness or functionality.
  • A breaker can contain repeated calls, but it needs probes and a recovery policy.
  • A timeout cannot replace independent capacity after a zone or region loss.

Use one evaluation function for every sample so the experiment cannot silently change its success criteria after observing the result.

Classify held, falsified, and abort outcomes

Increase realism only after the safeguards prove themselves

Production experiments can capture traffic, topology, dependencies, and utilization that a test environment misses. That realism is valuable only after the team has shown that targeting, stop conditions, cleanup, observability, and incident ownership work.

  1. 1

    No fault

    Model and review

    Write the hypothesis, dependency path, likely amplification, permissions, abort condition, cleanup, and expected remediation owner.

  2. 2

    Controlled

    Rehearse outside production

    Validate action semantics, target selection, observability, cleanup, and the manual stop path without customer traffic.

  3. 3

    Bounded

    Expose a small production cohort

    Use representative traffic with one target, a short duration, an automatic stop condition, and active operators.

  4. 4

    Continuous

    Automate a proven contract

    Schedule only stable, owned experiments. Pause them during unrelated incidents and rerun them after architecture or recovery behavior changes.

Azure Chaos Studio likewise describes faults as controlled and time-bounded and distinguishes target selection, fault parameters, experiment steps, and operational evidence.

Turn every run into a reliability decision

An experiment is complete only when its evidence changes confidence, design, or operations.

Before the run

  • Record the owner, hypothesis, fixture or workload, release, topology, and experiment ID.
  • Confirm dashboards, traces, logs, business metrics, target preview, stop conditions, permissions, and cleanup.
  • Announce the window and define who may stop the experiment.

During the run

  • Watch the steady-state and abort metrics, not only the fault tool's status.
  • Record when the fault starts, when the system reacts, when the stop condition fires, and when users recover.
  • Stop for unexpected impact even if the original alarm has not fired.

After the run

  • Verify fault removal, capacity restoration, queue drain, replica health, and delayed side effects.
  • Preserve the evidence and state whether the hypothesis held, was falsified, or was inconclusive.
  • Create owned remediation work with a rerun condition.
  • Retire experiments whose target, action, or product invariant is no longer valid.

An inconclusive run is not a pass. Missing telemetry, a target that never received the fault, unrelated deploy activity, or a failed cleanup path means the team must repair the experiment before drawing a resilience conclusion.

No quiz questions available
Could not load questions file
Spotted an issue or have a better explanation? This page is open source.Edit on GitHub·Suggest an improvement