Chaos engineering: 7 steps to a controlled reliability experiment
Chaos engineering tests a specific belief about how a service behaves under a controlled fault. The team defines an expected outcome, introduces a bounded condition, observes the result, and learns from the gap. The purpose is to reduce uncertainty about reliability through evidence, rather than create disruption for its own sake.
This article explains seven steps for a useful experiment. It covers hypotheses, scope, safeguards, observation, recovery, and follow-up. A business checkout service provides a practical example, with an emphasis on suitable authorization and a controlled environment.
What makes a chaos experiment useful?
A fault test becomes useful when it answers a clear question. For example, the team may believe that checkout can continue when one nonessential recommendation service becomes unavailable. The experiment examines that belief within a defined scope.
The Principles of Chaos Engineering describe hypothesis-driven experiments and learning about system behavior. Start with a practical question and evidence the team can interpret rather than a large catalog of fault types.
Chaos testing can complement other checks. Unit and integration tests examine defined behavior, while a controlled fault exercise can reveal interactions and operational gaps. Neither method replaces the other.
First, choose a suitable environment and an authorized owner. A team can learn a great deal from a representative nonproduction system before considering any broader scope. Production work requires a deliberate, separately governed operating decision.
1. State the reliability belief as a hypothesis
Write the expected behavior in terms of the user task. “The system is resilient” is too broad. A more useful hypothesis states which task should continue, under which fault, and within which agreed service conditions.
For checkout, the team might expect order completion to remain usable when recommendations fail. Define the relevant success, latency, and error observations with the service owner. Do not invent a target merely to make the experiment pass.
Next, identify why the belief is uncertain. The team may never have tested a real timeout, or an earlier incident may suggest a hidden dependency. That reason helps prioritize the work.
Oxen’s site reliability engineering guide explains user-facing service targets. Use those targets to choose observations that reflect business impact rather than only component status.
2. Bound the experiment and affected work
Define the service, environment, targets, users or test traffic, duration, and fault. Keep the first scope small enough that the team can understand and recover it. A broad multi-fault exercise can make cause and effect difficult to separate.
List dependencies that must remain outside the test. The chosen boundary should be enforceable through the platform and access model, not only a sentence in a plan. Review target selection before execution.
Next, check whether the environment is representative enough for the hypothesis. A small test system may omit queues, routing, or timeouts that matter. Record those limits rather than assume the result applies everywhere.
Use safe test data and suitable workloads. The experiment should not create uncontrolled external transactions or messages. Where a third-party dependency is involved, test only through an authorized arrangement or a controlled substitute.
3. Establish stop conditions and recovery ownership
A controlled experiment needs a clear way to stop the fault and respond to unexpected effects. Define the observations that trigger a stop, who watches them, and who can act. Also keep a manual stop route where appropriate.
AWS Fault Injection Service stop-condition guidance describes a product mechanism tied to monitored conditions. Confirm the actual mechanism and limits of your chosen tool rather than assume a stop condition restores every affected state.
Test the stop path before relying on it for a consequential exercise. A missing alarm signal or incorrect target can undermine a safeguard. Review the whole path from observation to stopped fault.
Also define cleanup. Stopping injection may not drain a backlog, reset a circuit breaker, or reconcile uncertain transactions. Give each recovery task an owner and a verification condition.
4. Prepare observations before introducing the fault
Capture a baseline for the user task and relevant dependencies. The team needs to know what ordinary behavior looks like under the chosen workload. Otherwise, it may mistake normal variation for an experiment effect.
Oxen’s article on observability engineering explains how signals help answer questions across a service. Connect user outcomes, traces, logs, and resource measures where they support the hypothesis.
Keep timestamps and experiment markers clear. A reviewer should identify when the fault began, when it ended, and which traffic belonged to the test. Preserve enough context to investigate an unexpected result.
Next, define missing-data behavior. If an essential observation disappears, the team may no longer know whether the experiment remains within scope. Treat that uncertainty according to the agreed stop policy.
5. Introduce one justified fault and observe the whole path
Choose a fault that represents a plausible condition relevant to the hypothesis. A delayed dependency, a limited unavailable component, or a constrained resource can each answer different questions. Avoid selecting a fault only because the tool makes it easy.
Follow the approved plan and verify the actual targets. During the exercise, record the system’s response and the team’s actions. Do not add another fault casually when the first result looks interesting.
For checkout, inspect more than whether the recommendation call fails. Does checkout wait too long, retry excessively, or fail to show a suitable fallback? The meaningful result is the user flow across the dependency boundary.
Also observe secondary effects. A retry policy may protect one request while overwhelming another service. Keep those findings within the record even if the main task appears to pass.
6. Verify recovery and reconcile uncertain work
After the fault stops, confirm that the service returns to the agreed state. A green component monitor does not prove all queues, sessions, and business records have recovered.
For checkout, inspect interrupted or uncertain orders and relevant payment or test-provider records. The appropriate recovery should follow the application’s supported process. Avoid blindly replaying consequential operations.
Oxen’s guide to disaster recovery testing software explains the wider value of verified recovery exercises. A chaos experiment may cover a smaller scenario, but it still needs evidence that the test ended cleanly.
Next, remove temporary configuration and confirm access or target settings return to their intended state. A leftover experiment condition can cause a later incident unrelated to the original learning goal.
7. Turn findings into owned improvements
Compare the observations with the hypothesis. The outcome may support the belief, reveal a gap, or remain inconclusive because the test lacked suitable evidence. All three can be useful when the conclusion is honest.
Assign a small set of follow-up actions. A useful action names the missing behavior or operating capability, an owner, and a test that will show improvement. “Make checkout resilient” is too vague to complete.
Oxen’s article on incident management software explains coordination and learning records. Connect experiment findings with the team’s normal engineering process rather than leave them in a separate report nobody reviews.
Finally, rerun the relevant experiment after a material fix where appropriate. The team needs evidence that the change addressed the observed gap, not only a completed ticket.
A small checkout experiment plan
Use a representative controlled environment and test traffic. State that checkout should complete under the approved conditions when a nonessential dependency does not respond normally. Record the baseline and expected fallback.
Define the target, duration, observation set, stop conditions, roles, and cleanup before execution. Review the plan with the service and environment owners. Confirm that external effects remain within the authorized test scope.
Next, run the fault and watch user outcomes, request paths, retry behavior, and queues. If the stop condition triggers, follow the plan and preserve the evidence. Do not treat stopping early as a failed exercise.
Then verify recovery and inspect uncertain work. Record whether the hypothesis held and which limits affect the conclusion. A clear result can guide a targeted engineering improvement.
Choose tools around the experiment lifecycle
A tool may help select targets, inject a fault, record activity, and stop on defined signals. Evaluate those functions with your actual environment and permissions. A long list of fault actions does not establish operating safety or learning value.
Test dry-run or target-preview features where available. Also inspect audit records, access boundaries, and cleanup behavior. Operators should understand what the tool can and cannot reverse.
Keep experiment definitions versioned where practical. Review changes to targets and safeguards as carefully as changes to the fault itself. A familiar experiment name can hide a materially wider scope.
Common mistakes that weaken the evidence
Do not start with a fault and invent the hypothesis afterward. That encourages broad conclusions from an uncontrolled event. Define the question and expected observations first.
Do not use only server health as a measure of success. Users may fail to complete work while every process remains online. Likewise, a busy resource can be normal if the service still meets its agreed goal.
Avoid changing several variables at once during an early experiment. If behavior changes, the team needs a reasonable basis for explaining why. More complexity can produce less useful evidence.
Finally, do not extrapolate one successful test to all outages. The result applies to the tested conditions and assumptions. Preserve that scope in the conclusion.
Build a sustainable program
Start with a few important service beliefs and prioritize uncertainty with the owners. Use incidents, architecture changes, and repeated operational questions to choose the next experiment.
Include preparation, observations, review, cleanup, and follow-up in the effort estimate. The injection itself may be a small part of the work. A program that skips those surrounding steps can create activity without learning.
Keep access to fault tools limited to suitable roles and approved environments. Train the team through controlled exercises and documented handover. The operating model should survive the original champion leaving.
Measure learning rather than disruption
Useful measures include important assumptions tested, gaps found, verified fixes, and improved recovery capability. The number of faults injected is not a direct measure of value.
Review whether the team can explain findings and act on them. A modest experiment that exposes a critical retry problem can offer more value than a broad exercise with no clear conclusion.
Also maintain the experiment library. Retire obsolete scenarios and update definitions after architecture or service-target changes. A previously useful test can become misleading when its assumptions no longer apply.
Retest an improvement against the original hypothesis
After a team fixes a retry or recovery gap, repeat the relevant experiment under comparable controlled conditions. Preserve the original hypothesis and observations so reviewers can assess whether the change improved the behavior that mattered.
For example, a shorter timeout may reduce the wait for one failed request while increasing the number of retries. The retest should inspect the customer outcome, downstream load, and unresolved work together. Otherwise, the team may improve one graph while moving the problem elsewhere.
Record material differences in workload, configuration, or dependency behavior between the two runs. Those differences limit a direct comparison. If the environment changed substantially, establish a fresh baseline before drawing a strong conclusion. This closes the learning loop and provides stronger evidence than marking an engineering ticket complete.
Frequently Asked Questions
Must chaos engineering run in production?
No. A representative controlled environment can answer useful questions, especially early in adoption. Any broader scope needs deliberate authorization, safeguards, and an operating plan.
Is an experiment successful only if nothing breaks?
No. Finding a bounded, understandable gap can be valuable. The important result is reliable evidence and a clear improvement path, not a favorable demonstration.
Does stopping the fault finish recovery?
Not necessarily. Queues, uncertain writes, and temporary settings may still need attention. Define and verify cleanup separately.
Test a belief and preserve the evidence
Chaos engineering works when a clear hypothesis meets a bounded fault, useful observations, and verified recovery. Start small, keep ownership explicit, and turn findings into tested improvements. The aim is a service the team understands better.