Skip to main content

What Is Chaos Engineering?

Every distributed system fails. Hosts die, networks slow down, disks fill up, and dependencies time out โ€” not occasionally, but constantly. Teams build their systems to survive those failures, with retries, redundancy, and failover. The trouble is that "we built it to survive" is a belief, not a fact. Most teams never actually find out whether their resilience works until a real outage tests it for them, at the worst possible moment.

Chaos engineering is the discipline of removing that uncertainty. Instead of waiting for failure, it injects failure on purpose โ€” in a controlled, measured way โ€” to discover weaknesses before they become outages.

The name makes it sound reckless. It is the opposite. Done properly, chaos engineering is one of the most rigorous, scientific practices in software: a careful experiment with a hypothesis, a controlled change, and a measured result. This guide explains it from first principles, working through the questions newcomers usually ask โ€” why you would break your own system, how it differs from ordinary testing, how to do it without causing a real outage โ€” and gradually building toward the deeper method. Read straight through, or stop wherever your question is answered.


What is chaos engineering, in one sentence?โ€‹

Chaos engineering is the practice of deliberately injecting failure into a system โ€” killing servers, slowing networks, exhausting memory โ€” to discover weaknesses before those failures happen on their own and take the system down.


Why would anyone break their own system on purpose?โ€‹

Because the system is going to break anyway. The only question is whether you find out on a Tuesday afternoon with engineers watching, or at 3 a.m. during a real outage with customers watching.

Modern systems are distributed: dozens of services, networks, databases, queues, and cloud regions, all depending on each other. Failure in any one of them is not a rare event โ€” it is constant. Hosts die, disks fill, networks lag, dependencies time out.

Teams assume their system handles these failures gracefully โ€” that retries work, that failover kicks in, that a slow dependency does not cascade into a full outage. But an assumption is not knowledge. Chaos engineering converts the assumption into evidence by causing the failure on purpose, in a controlled way, and watching what actually happens.

The phrase that captures it: you do not get to choose whether your system experiences failure โ€” only whether you experience it on your terms or its terms.


Is this not just testing? We already have tests.โ€‹

It is testing, but a different kind of testing, aimed at a different gap.

Unit, integration, and end-to-end tests check known behaviour against known inputs: "given this request, do I get the correct response?" They verify the things you thought to write a test for.

Chaos engineering targets the opposite: the system's behaviour under conditions you did not plan for. It does not ask "is my code correct?" It asks "when the database disappears mid-request, does my system degrade gracefully, or does it fall over in a way nobody predicted?"

The distinction in one line:

Regular testing verifies what the system does when things go right. Chaos engineering discovers what it does when things go wrong.

A system can have 100% passing tests and still collapse the moment a single dependency gets slow โ€” because no test exercised that scenario. Chaos engineering is built to surface exactly those unknowns.


What is the difference between chaos engineering and a failure I would write a test for?โ€‹

A subtle but important point. You can write a test that mocks a dependency failure. Teams do, and should.

But a mocked failure tests your code's failure-handling logic in isolation. Chaos engineering injects a real failure into a real, running, fully-connected system and observes the emergent behaviour โ€” the cascading effects you cannot predict from any single component.

Example: you have a unit test confirming your service retries a failed call three times. That test passes. But in production, when the dependency is slow (not failed โ€” slow), all three retries pile up, every request holds a thread, the thread pool exhausts, and the service stops responding to healthy traffic too. No single-component test catches that. A chaos experiment that injects latency into the dependency does.

Chaos engineering lives at the system level, where surprises emerge from interactions rather than from any one piece.


What does a chaos experiment actually look like?โ€‹

A well-formed chaos experiment has four parts, run in order:

  1. Define the steady state. Decide what "the system is healthy" means, measured by real metrics โ€” for example, "99% of checkout requests succeed within 300 ms."
  2. Hypothesise that it holds during failure. State the belief out loud: "If we kill one of the three payment-service instances, the steady state will still hold, because load balances across the survivors."
  3. Inject the failure. Kill that instance. For real.
  4. Compare. Did the steady state hold? If yes, you have evidence of resilience. If no, you have found a weakness โ€” before it found you.

The experiment is a genuine experiment in the scientific sense: a hypothesis, a controlled intervention, and a measured result.


What is the "steady-state hypothesis" โ€” that sounds important?โ€‹

It is the heart of the method, so it is worth being precise.

The steady state is a measurable definition of normal, expressed in terms of output metrics rather than internal ones. Good steady-state metrics are things a customer would notice: orders per minute, request success rate, p99 latency. Bad ones are internal and easy to satisfy: CPU usage, a host being "up."

The hypothesis is the prediction that the steady state will continue to hold while a specific failure is injected.

This framing matters because it forces honesty. You are not vaguely "trying to break things." You are stating a concrete, falsifiable belief โ€” "killing this instance will not affect checkout success rate" โ€” and then testing it. When the hypothesis is wrong, you have learned something specific and actionable.


This sounds dangerous. How do you do it without causing a real outage?โ€‹

This is the central discipline of chaos engineering, and the answer is blast radius control.

The blast radius is the scope of impact a failure is allowed to have. A mature chaos practice keeps it small and expands it deliberately:

  • Start tiny. One instance, not the whole fleet. One pod, not the namespace. 5% of traffic, not all of it.
  • Have an abort switch. Every serious chaos tool can halt and roll back an experiment instantly. Failure injection is designed to be reversible.
  • Use automatic stop conditions. Wire the experiment to monitoring โ€” "if error rate exceeds 5%, abort automatically." The experiment polices itself.
  • Expand gradually. Only after a failure proves safe at small scale do you widen the blast radius.

Done properly, a chaos experiment is safer than the real outage it simulates, because it is small, supervised, reversible, and scheduled for a moment when engineers are watching.


Should chaos experiments run in production or in staging?โ€‹

Both, and there is a real tension here.

The honest argument for production is that staging never fully matches it โ€” not the same traffic, the same data volumes, the same scaling behaviour, the same dependency versions. A weakness that only appears under production conditions will only be found in production. The most-cited chaos engineering principle is "run experiments in production."

The honest argument for staging first is risk. A team new to chaos engineering, with immature blast-radius controls and weak monitoring, should not start in production. They will cause the outage they were trying to prevent.

The practical path: begin in staging to build the tooling, the monitoring, and the team's confidence. Graduate to production once blast-radius control and automatic aborts are genuinely trustworthy. Production is the goal, not the starting line.


What kinds of failures can you inject?โ€‹

The common fault categories, roughly from simplest to most subtle:

  • Resource exhaustion โ€” burn CPU, fill memory, fill disk, saturate I/O.
  • Instance / pod termination โ€” kill a host or container outright. This is the original chaos fault.
  • Network faults โ€” inject latency, drop packets, limit bandwidth, sever connections, cause DNS failures. Often the most revealing, because slowness exposes more bugs than outright failure.
  • Dependency faults โ€” make a downstream service, database, or queue fail or slow down.
  • Cloud / platform faults โ€” fail over a managed database, throttle a cloud API, take an availability zone offline.
  • Application-layer faults โ€” inject exceptions or latency inside the application, sometimes down to specific methods.
  • Time faults โ€” shift the system clock to expose time-sensitive bugs.

A common surprise: latency injection finds more bugs than outright kills. A dead dependency triggers obvious failure paths. A slow one triggers timeouts, retry storms, and thread-pool exhaustion that nobody designed for.


What is a "game day"?โ€‹

A game day is a scheduled, planned session where a team runs chaos experiments together โ€” often a larger, more ambitious failure than day-to-day automated chaos.

It is as much an exercise for the people as for the system. A game day tests whether engineers can detect the failure, whether alerts fire, whether runbooks are correct, whether the on-call rotation knows what to do, and whether the incident response process actually works.

Mature teams run game days regularly. They also automate smaller experiments to run continuously in the background, so resilience is verified all the time rather than only on game days.


Where did chaos engineering come from?โ€‹

It started at Netflix around 2010โ€“2011, during their migration to the AWS cloud. They built Chaos Monkey, a tool that randomly terminated production server instances during business hours. The goal was cultural as much as technical: if instances die constantly, engineers can no longer build systems that assume instances are permanent. Resilience stops being optional.

Chaos Monkey grew into the Simian Army (a suite of failure-injection tools), and Netflix later codified the discipline in the Principles of Chaos Engineering. From there it spread industry-wide, and a generation of tools โ€” open-source platforms, cloud-managed services, and commercial products โ€” grew up around it.


How is this different from a disaster recovery (DR) drill?โ€‹

They are related but operate at different scales and frequencies.

A DR drill is a large, infrequent rehearsal of a major catastrophe โ€” losing an entire data centre or region โ€” usually run once or twice a year with heavy planning.

Chaos engineering is smaller, more frequent, and more granular. It injects specific, individual failures continuously, builds resilience incrementally, and treats failure injection as a routine engineering practice rather than a rare event.

Think of DR drills as the occasional full fire evacuation, and chaos engineering as continuously testing every individual smoke detector, sprinkler, and fire door.


When is a team ready to start chaos engineering?โ€‹

Chaos engineering has prerequisites. Without them, it produces noise instead of insight.

You are ready when you have:

  • Observability. You must be able to see what the failure did โ€” metrics, logging, tracing. If you cannot measure the steady state, you cannot run a real experiment.
  • A defined steady state. You need at least one concrete, customer-facing health metric.
  • Basic resilience already designed in. Chaos engineering verifies resilience; it does not create it. If you have no retries, no redundancy, and no failover, you do not need a chaos tool to tell you the system is fragile.
  • A blame-free culture. The point is to find weaknesses, which means surfacing things that are broken. If that triggers blame, people will hide problems instead of exposing them.

If you have none of these yet, the best first step is not a chaos tool โ€” it is monitoring and basic redundancy. Chaos engineering comes after that foundation.


Where to go nextโ€‹