Video in progress

How do you introduce chaos engineering in an organization, and how do you choose the first experiments?

First I define the system's steady state with a business metric, then form hypotheses from past incidents and architecture claims, and run experiments with a small blast radius and a stop button ready, in staging first and then in prod. The goal isn't to break things; it's to find wrong assumptions before an incident does.

📖 Answer

Most people understand chaos engineering as "we kill random pods in prod", and teams object right away. In reality it's an experiment: testing the hypothesis "if X happens, the system behaves like Y".

Preparation, and I don't start without it:

  • a metric that shows the effect of the experiment, for example successful checkouts per minute, not just CPU;
  • every experiment stops with one button, and stops automatically if the metric crosses a threshold;
  • the team's consent, and the time announced in advance.

The first experiments. The most useful sources:

  • past incidents: "during a Redis failover the service was down for 5 minutes, we fixed it". Did it really get fixed? Try to repeat it;
  • claims in design documents: "if the recommendation service goes down the page still opens", "if one zone fails, traffic moves to the others";
  • adding 2 seconds of latency to a dependency. This often reveals more than shutting it down: a slow dependency is more dangerous than a dead one, because timeouts and pools are tested right there.

Stages. Staging → one pod or a small percentage of traffic in prod → one zone. After each experiment, a write-up: was the hypothesis confirmed, what was found, which ticket was opened.

Tools. Chaos Mesh or LitmusChaos on Kubernetes, the cloud providers' fault injection services, Toxiproxy at the application level. But the tool is secondary: the list of experiments and the work on the results matter more.

GameDay. Once a quarter, a planned drill with the teams: "primary DB failover" or "one region is gone". Here the people are tested along with the technology: does the runbook work, did the on-call see the alert, who makes the decision.

Measuring the outcome: how many incidents could have been found in advance by an experiment, and how fast the found weaknesses were fixed. If a found problem isn't fixed, chaos engineering turns into just scaring people.