Podcast about DevSecOps

#77 - Chaos Engineering Explained: Part 2

Past incidents supply the first experiments; monitoring makes their results useful.

18 min read

Part two of our chaos engineering series is here! Join Andrey, Mattias, and Paulina as they talk through practical strategies for chaos engineering. Who should do it? How can you start? And what are the essential prerequisites?

Discuss the episode or ask us anything on LinkedIn


The hard part comes before the first experiment

You’ve agreed that deliberately breaking things is worth doing. Now someone has to decide what to break, in which environment, with which tool, on whose calendar, and with whose approval. That is where the idea usually stops, somewhere between a good conference talk and a Jira ticket nobody picks up.

The decision that matters first isn’t the tool. It’s whether the system you’re about to break can tell you what happened to it. Inject a fault into a system with thin monitoring and you don’t get a finding, you get a small outage you can’t explain. Same for a system that’s already unstable: the signal from the experiment disappears into the noise you live with anyway.

So the practical order is the opposite of the exciting one. Answer a short list of readiness questions. Take your first scenarios from incidents you already had. Start with the failure your architecture already claims to survive. Pick the tool after that, because by then you know what it has to reach. We covered what chaos engineering is and why the name misleads in part one; this is the part where you actually schedule something.

Answer the readiness questions before you break anything

The list is short, and most of it is about what you would see rather than what you would break.

What has to be true before the first experiment?

Monitoring that would show the impact, a system that stays up when nobody is poking it, some automated incident response, post mortems you actually write, and a business side that knows this is happening.

Walk it as yes or no questions with the team. Do you have monitoring, and would it show the difference? Is the system stable today? If not, go back to basics; you don’t go looking for advanced failure modes while the ordinary ones are still live. Are the services you care about actually running in more than one place? Does recovery happen without a human: auto scaling, circuit breakers, something that restarts the process? Does the alert reach the person who can act on it by itself, or does every step wait for someone to notice? Do you run post mortems, and does anything change as a result? Do you have SLAs or SLOs, so “worse” has a number attached?

Monitoring is also where the cost argument arrives. We’ve seen some wild savings made on logging, and logging in the cloud does get expensive. If you’re going to run experiments, turn the logging back up for the window even if you won’t keep it on. One trap if you economise first: CloudWatch’s Infrequent Access log class, launched on 26 November 2023 at half the standard ingestion price, doesn’t support metric filters or alarms. Alarms are what your stop conditions and half your verdict hang on.

Too many no’s? Run a game day instead. Pick one scenario, book a date, and work through it on dev, test or a scratch environment. Where you have the choice, take the environment closest to production, because a result from a scratch stack says less about the system you actually run. You get most of the learning without needing every prerequisite in place first.

Your post mortems are the experiment backlog

Once the answers are mostly yes, the next question is what to break, and you don’t have to invent it.

Where do the first scenarios come from?

From the incidents you already had: re-create the outage and check that the fix you shipped afterwards holds.

A post mortem hands you the failure, the blast radius and the change you made in response. That last part is what makes it a hypothesis rather than a war story. We think we learned something from that incident and improved the system, so let’s emulate the outage and find out. It might be reproducible, it might not, and that depends on what broke. Your defect tracker is the second source: whatever keeps coming back is a failure mode your design hasn’t accounted for yet.

Be honest about which incidents this can reach. In the enterprise teams we’ve worked with, changes made without understanding dependencies have often caused incidents: someone changes something without knowing what depends on it, and the change travels. You can test the blast radius of that change. You can’t inject the inattention. Those belong in change management and review, not on the experiment list. The post-incident habits that produce this backlog are their own subject, and we spent an episode on them.

Start with the failure your architecture already claims to survive

With a backlog in hand, start with the cheapest experiments: the ones your design has already promised to pass.

Which fault do you inject first?

A database failover, then a scoped simulation of an availability zone going dark, in that order.

Take a multi-AZ RDS instance. Trigger the failover and watch the application: connections dropped, reconnect behaviour, retries, how long before writes succeed again. AWS doesn’t promise you a duration, and that’s the point of measuring your own. The RDS docs say a reboot with failover causes an outage even in a Multi-AZ deployment, and that the time depends on crash recovery, database activity and the engine. FIS has both paths as actions, aws:rds:reboot-db-instances for a Multi-AZ instance and aws:rds:failover-db-cluster for an Aurora cluster. Set forceFailover to true on the reboot action. The parameter is optional, and its default is false. Only the true value “forces failover from one Availability Zone to another”. Leave it alone and you restart the instance where it is, which times a reboot rather than a failover. aws fis list-actions prints the current names.

Then take the zone, with one correction to the mental model. FIS doesn’t switch an availability zone off. The AZ Availability: Power Interruption scenario induces the symptoms you’d expect from one: it stops the EC2 instances in that zone, blocks launches and scaling there, cuts subnet connectivity, and fails over RDS and ElastiCache.

Which of those actually happen depends on the targets you hand it, and the scenario selects them two different ways. Most of its actions find targets by tag. The action that blocks new launches targets IAM roles by ARN instead, so a role missing from that list keeps launching instances into a zone that’s supposed to be dark. In AWS’s own words, “actions for which no targets are found will be skipped”, so a run can report success while quietly leaving out the tier nobody tagged. Check the role ARNs alongside the resource tags before you read the verdict, and add your own stop conditions, because the scenario ships without any.

A clean pass tells you the resources you listed survived the symptoms the scenario injects, which is less than proof that the zone can disappear. It’s still the most informative hour you can spend, and after one zone, try two.

If your system doesn’t survive losing one availability zone, don’t buy a chaos tool. Go fix the architecture. Most systems we see already have the parts: a load balancer, an auto scaling group or a container scheduler spread across zones, a multi-AZ database. The exceptions are bare-bones MVPs saving money on a single server, and they have a different problem.

External dependencies are easy to break, internals aren’t

Below the zone level the list splits in two, and the two halves need very different effort.

What’s actually hard to test?

Anything inside the process: memory, CPU, runtime internals. Everything your service reaches over the network is a configuration change away.

You don’t shut S3 down. You deny your own traffic to it. The FIS action aws:network:disrupt-connectivity takes a scope that says how wide the block goes. all covers everything entering and leaving the subnet. vpc covers only what crosses the VPC boundary from those subnets. availability-zone covers intra-VPC traffic to subnets in other zones. s3 and dynamodb cover those regional endpoints, and prefix-list covers the destinations you put in the list. Whichever you pick, FIS denies traffic to and from that target for the subnets you name, for the duration you set (tutorial). Note what vpc doesn’t do: traffic between subnets inside the VPC keeps flowing. Work out which of your dependencies are game stoppers and which aren’t, then test the difference between your belief and the behaviour. You read the code, you read the Terraform, you think you know what happens when the analytics write fails. The experiment is cheaper than the argument.

Latency is often the better fault. A dependency that’s slow rather than gone puts your timeouts, retries and connection pools under exactly the pressure that produces the hard-to-debug incidents.

The internal half is where the tooling gets thinner. On AWS, resource pressure isn’t a native fault, it’s Systems Manager: aws:ssm:send-command with the AWS-provided AWSFIS-Run-Memory-Stress or AWSFIS-Run-CPU-Stress documents, which run stress-ng on the instance (docs). The SSM agent has to be installed, the document has to support the OS you run, and it may install its own dependencies before it starts, so check that before you build a plan around it. For ECS there’s aws:ecs:task-cpu-stress. Those stress actions squeeze the machine from outside your process rather than reaching into it, so goroutine counts, thread pools and GC behaviour stay yours to instrument.

Pick the tool that matches where your system runs

With a fault in mind, the tool choice narrows to whatever already has access to your runtime.

Which tool should you start with?

The one already inside your environment: FIS on AWS, Litmus on Kubernetes, Pumba against a container runtime, a commercial platform if you’d rather buy the scenarios than build them.

AWS FIS is Lego. It’s big, you can do quite a bit with it, and you build it yourself: that’s the AWS pattern, here are the blocks, go be a builder. The scenario library is real but short, and the availability zone one above is the entry that earns its keep. Pair it with alarms, a dashboard and your own interpretation, because none of those arrive with it.

Gremlin is the SaaS end. You install an agent on each host or as a DaemonSet on each node and drive experiments from the web app, API or CLI (docs). What the money buys is packaged attacks and reporting, a head start on the parts you’d otherwise assemble yourself.

Litmus is the open source Kubernetes option, a CNCF incubating project since January 2022. Experiments are Kubernetes custom resources, ChaosCenter is the portal, and probes are where you declare the checks that decide whether the experiment passed.

Pumba is the small one, named after the Lion King character, and it needs no account-level anything. It drives the container runtime directly: kill, stop, pause or remove containers, add latency and packet loss with netem, drop incoming packets with iptables, stress CPU and memory with stress-ng. You pick targets by name, regex or label, --random chooses from the matching set, and --dry-run prints what it would have done. Check its reach before you plan around it. Pumba talks to the Docker daemon socket, unix:///var/run/docker.sock, and its Kubernetes route is a DaemonSet filtering on labels like io.kubernetes.pod.namespace. A containerd cluster isn’t reachable that way, because Kubernetes removed dockershim in 1.24.

One assumption worth correcting: the SaaS and Kubernetes platforms don’t sit on top of FIS. Each ships its own agent or operator, so the choice is a platform decision, and installing an agent on every node needs the same approval conversation as the experiment itself.

There’s one more tool in wide use that nobody lists. Ask ChatGPT how to do something, get a plausible script, run it against an environment that matters. That’s chaos testing too, with no hypothesis, no blast radius and no stop condition.

Pipeline experiments need an automated verdict

Having picked a tool, the next question is when it runs, and the obvious answer is the contested one.

Can you run chaos experiments in CI/CD?

For scenarios narrow enough that a check can read the outcome, yes. The argument is about how many of your scenarios are that narrow.

This is where we disagree. Andrey questions whether CI/CD makes sense when the experiment’s result requires human interpretation. A load test returns a verdict from the same tool that generated the traffic. Requests sent, requests failed, fewer than 1% failures: parse the JSON, pass or fail. A CI system that answers “maybe” is a bad CI system. A chaos experiment sends you somewhere else to look. You trigger a network outage, then correlate what the application logs, the load balancer and the database say about the next few minutes. Andrey isn’t convinced monitoring is sophisticated enough yet for a machine to reason about that. Paulina’s answer is that it depends on scope. Narrow it to two or three scenarios with defined limits, and some checks are mechanical. Is the server back? Did the database connections recover? Has the error rate stayed under the line in the logs you already collect? Automate those, leave the ambiguous ones to a human, and expect AI reasoning to close part of the remaining gap.

The tooling shows where that line falls. Chaos Toolkit asks you to declare a steady-state hypothesis with a tolerance for each probe: the run bails out if the steady state doesn’t hold before the fault, and a probe outside its tolerance fails the experiment. Litmus probes do the equivalent inside the cluster and roll up into a verdict. The pass/fail plumbing exists. What it needs from you is the number that separates “degraded as designed” from “broken”, written before the run.

What most teams want first is a cadence rather than a pipeline stage, and the cadence isn’t yours alone to set. It depends on what the system does, and you agree it with the business: run an emergency line and the window is narrow and planned, run something more forgiving and you can go further. AWS announced scenarios and scheduled experiments in November 2023, and the experiment scheduler creates the EventBridge Scheduler rules for you. Running an experiment after every release is a high maturity move, and it belongs well after the scheduled one works.

The recurring slot you already have is the DR test

A cadence needs a slot in someone’s plan, and arguing for a new one is harder than claiming an existing one.

How do you get the time approved?

Attach the experiment to the disaster recovery test you already owe an auditor.

Everyone likes reliability, and reliability loses to features. Compliance doesn’t, because the obligation has a date on it. AWS’s own reliability guidance is blunt about the first half of what that obligation requires: fail over to the standby regularly, whether or not an incident calls for it. The second half is your runbooks. Use them during the drill, and write down every place they were wrong so it’s fixed before the next one. That is a chaos experiment with a different name on the calendar invite.

The report is what makes it fundable. Since 12 November 2024 FIS generates experiment reports for exactly this audience: a PDF that summarizes the actions the experiment took and optionally captures application response from a CloudWatch dashboard you specify, one dashboard per report. Take the optional part seriously. An action summary shows the fault went in; the dashboard snapshots are what show the application came back. Reports also aren’t produced for cancelled experiments or target previews.

And whatever you run, close the loop: write down what you learned, implement it, and tell the business what the time bought. That’s what gets you the next slot.

Who owns it: SRE, platform, or the only team you have

Funding settled, there’s one question left, and the answer depends on an org chart that may not exist.

Which team should run the experiments?

Whoever is accountable for the system staying up, which in most companies is a role someone wears rather than a team you can point at.

Here the two views differ. Andrey splits it by disposition, and offers that as a personal opinion. Platform engineering builds the systems: the Terraform, the containers, the CI/CD and the tools developers deploy with. SRE is less about building and more about observing the running system and making it more reliable. Chaos testing fits the second better than the first. Paulina’s answer is that this split is rarer than the job titles suggest. Plenty of teams carry every name at once, infrastructure, DevOps, automation and systems engineering, and they do all of it, so the question is who in that team picks it up.

The security comparison is the useful one. You already prove security: scanners on the pipeline, pen testers paid to get in, a red team and a blue team. An availability claim in a design document needs evidence from recovery tests. Chaos experiments produce that evidence the way a pen test report produces it for the other half of the promise.

Outside our own experience, the long-running example is Google’s DiRT, an annual company-wide disaster and recovery testing event where, as the SRE book describes it, engineers push production systems to the limit and inflict real outages to find the weaknesses. That’s a dedicated function doing it on purpose, at a scale most teams won’t copy. The portable part is smaller: whoever runs it needs the agent install approved, the on-call people in the room, and permission to stop.

What this means for teams

Chaos engineering in practice is less dramatic than its name and more administrative than its talks: a prerequisite list, a scenario taken from an old incident, a date in a calendar, and a report someone outside engineering will read. The tool is the last decision, and the least interesting one.

Four things you can do this week:

  • Run the readiness questions as a list with your team and count the no’s. Monitoring, stability, automated response, post mortems, SLOs, management awareness. A no on monitoring stops the exercise; the rest tell you whether you start in production or on dev.
  • Open your last three post mortems and turn one into a hypothesis with a steady state, a fault, a threshold and a duration. If you can’t write the threshold, you’ve found the real gap.
  • Fail over one non-production database with the load generator running and time it: connections dropped, time to first successful write, what the application logged. Run it on the environment closest to production you have, pre-prod rather than a bare dev stack, with an instance class, replication setup and load that resemble the real thing. The number is then a baseline for comparable database failover experiments, not for everything you run later.
  • Put your next disaster recovery test in the calendar as an injected-fault experiment rather than a tabletop, and decide now where the report will be filed.

Common questions, answered

How do I test what happens when S3 is unavailable, without touching S3?

Block your own traffic to the endpoint instead. On AWS, the FIS action aws:network:disrupt-connectivity with scope s3 denies traffic between the subnets you specify and the regional S3 endpoint, for the duration you set. The prefix-list scope does the same for other destinations.

Start with added latency rather than a full block if the dependency sits on a write path you can’t afford to lose, since slow dependencies expose timeout and retry behaviour that a clean failure skips.

Can we do chaos engineering on bare metal or in our own data center?

Yes, and you’re partly doing it already, because hardware fails on a schedule nobody picked. Start with drills you control: turn off one server in a planned window and watch what the system does, then fail the database over and time it.

Check each tool against what it can reach. AWS FIS acts on AWS resources only. Gremlin installs its agent on the host, so a physical server is a target like any other (docs). Litmus needs a Kubernetes cluster, wherever that cluster runs. Pumba needs a container runtime it can drive. The method itself doesn’t depend on the provider: hypothesis first, limited blast radius, monitoring that would show the difference.

How often should we run chaos experiments?

There’s no standard interval, so agree one with the business, based on what your system does and how much disruption it can absorb. Run an emergency line and the window is narrow and planned; run something more forgiving and you can experiment far more often, up to running it continuously.

Your own confidence is the other input. If reading a result still takes an afternoon of correlating dashboards, a weekly run just produces a backlog of unread experiments, so raise the frequency as the verdict gets cheaper to produce.

Resources

Since we recorded

Pumba 1.0.0, released on 25 February 2026, added --runtime containerd, so the DaemonSet route now works on clusters that never had a Docker socket. AWS filled two FIS gaps: EBS I/O latency injection on 16 September 2025, and partial-failure scenarios on 12 November 2025 that degrade traffic instead of removing a zone. Our disagreement about automated verdicts came back in #99 AI SRE and the End of 3 AM On-Call, which explores agents that aim to produce a root cause analysis within minutes of the alert. Whether that’s enough to call an experiment pass or fail is still yours to check.