You get a bonus - 1 coin for daily activity. Now you have 1 coin

Chaos engineering and chaos monkeys as methods of injecting failures to reveal a system's weak points

Lecture



Chaos engineering is the discipline of experimenting on a system in order to build confidence in the system's capability to withstand turbulent conditions in production.

Concept

In software development, the ability of a program to withstand failures while maintaining an adequate quality of service — often called fault tolerance — is usually specified as a requirement. However, development teams may fail to meet this requirement due to factors such as tight deadlines or a lack of domain knowledge. Chaos engineering includes techniques aimed at meeting fault-tolerance requirements.

Chaos engineering can be used to achieve resilience against infrastructure failures, network failures and application failures; the latter includes resilience to unhandled exceptions.

Basic principles

  1. Define normal behavior (steady state)
    → for example: 95% of requests < 200ms
  2. Formulate a hypothesis
    → «if 1 server goes down, the system will keep working»
  3. Introduce a controlled failure
  4. Observe metrics
  5. Minimize the blast radius
    → start with small experiments

Chaos Engineering directly verifies:

  • robustness → whether the system withstands failures
  • resilience → how quickly it returns to normal
  • low coupling → whether the failure of one service drags down the whole system

Chaos engineering and chaos monkeys as methods of injecting failures to reveal a systems weak points

Operational readiness using chaos engineering

To assess the level of confidence in the reliability of interconnected complex systems deployed to a production environment, operational readiness indicators are needed. Operational readiness can be assessed using simulation within chaos theory. Solutions for increasing fault tolerance and operational readiness of a platform include strengthening backup, recovery, network file transfer, failover and overall environment security capabilities.

An assessment designed to induce chaos in a Kubernetes environment resulted in the termination of random pods receiving data from edge devices in data centers during the processing of analytics on a big data network. Pod recovery time was a fault-tolerance indicator that assessed response time.

History

1983 – Apple

While MacWrite and MacPaint were being developed for the first Apple Macintosh computer, Steve Capps created «Monkey» — a desk accessory that randomly generated user-interface events at high speed, simulating a monkey desperately banging on the keyboard, moving and clicking the mouse. It was quickly put to use for debugging, generating errors for programmers to fix, since automated testing was not possible; the first Macintosh had too little free memory for anything more sophisticated.

1992 – Prologue. While ABAL2 and SING were being developed for the first graphical versions of the PROLOGUE operating system, Ian James Marshall created «La Matraque» — a desktop device that, at high speed, generated random sequences of both valid and invalid graphical-interface events, thereby testing the behavior of critically important graphics libraries at partition boundaries. This program was run before deployment to production and worked for several days in a row, providing the necessary degree of complete fault tolerance. The tool was later extended to include database access instructions and other ABAL language files to verify and ensure their subsequent fault tolerance. A variant of this tool is currently used to test the modern version known as OPENABAL.

2003 – Amazon

While working on improving the reliability of Amazon's websites, Jesse Robbins created «Game Day» — an initiative that increases reliability through the deliberate, regular creation of serious failures. Robbins said he was inspired by firefighter training and research in other fields, lessons on complex systems and reliability engineering.

2006 – Google

Working at Google, Kripa Krishnan created a program similar to Amazon's Game Day program (see above), called "DiRT" (Disaster Recovery Testing). Jason Cahoon, a site reliability engineer at Google, wrote a chapter on Google DiRT in the book "Chaos Engineering" and described the system at the GOTOpia 2021 conference.

2011 – Netflix

In 2011, while overseeing Netflix's migration to the cloud, Nora Jones, Casey Rosenthal and Greg Orzell expanded this discipline, working together at Netflix to create a tool that induced failures in their production environment used by Netflix customers. The goal was to move from a development model that assumed the absence of failures to a model in which failures were considered inevitable, prompting developers to treat built-in fault tolerance as a duty rather than an option:

«At Netflix, our culture of freedom and responsibility led us to not force engineers to design their code in a particular way. Instead, we found that we could rally our teams around the idea of infrastructure fault tolerance, isolating the problems caused by neutralizing servers and pushing them to the extreme. We created Chaos Monkey — a program that randomly picks a server and shuts it down during normal working hours. Some may find this crazy, but we could not rely on the random occurrence of an event to test our behavior in the face of the consequences of that event. Knowing that this would happen often created strong cooperation among engineers to build redundancy and process automation in order to survive such incidents without affecting millions of Netflix users. Chaos Monkey is one of our most effective tools for improving the quality of our services».

By regularly "shutting down" random instances of a software service, it was possible to test redundant architecture and make sure that the failure of a server did not have a noticeable effect on customers.

The concept of chaos engineering is close to the concept of Phoenix servers, first introduced by Martin Fowler in 2012.

Types of chaos engineering (by type of impact)

1. Infrastructure chaos

  • servers going down
  • network outage
  • disk problems

Chaos Monkey, Gorilla

2. Network chaos

  • latency
  • packet loss
  • DNS problems

Latency Monkey

3. Application chaos

  • API errors
  • incorrect responses
  • timeouts

Exception Monkey

4. Security

  • misconfiguration
  • open access

Security Monkey

5. Regional / global

  • data center outages
  • failover

Kong / Gorilla

Chaos engineering ≠ random chaos

It is closer to:

  • a scientific experiment
  • hypothesis-driven testing

For example, Chaos Kong / Chaos Gorilla are ideally tested on real production systems, but in a very controlled and staged manner.

The main rule of Chaos Engineering

The test must be as close to reality as possible,
but the risk must be manageable

Chaos Kong (region outage) This is already a very high level of maturity

The real-world approach:

  1. first staging
  2. then shadow traffic
  3. then:
    • 1% of users
    • or read-only operations
  4. only then a full-scale test

Chaos engineering tools

Chaos Monkey

Chaos Monkey — is a tool developed by Netflix in 2011 to test the resilience of its IT infrastructure. It works by deliberately shutting down computers in Netflix's production network to test how the remaining systems respond to the failure. Chaos Monkey is now part of a larger toolset called the Simian Army, designed to simulate and test the response to various system failures and edge cases.

The code underlying Chaos Monkey was released by Netflix in 2012 under the Apache 2.0 license.

The name «Chaos Monkey» is explained in Antonio Garcia Martinez's book «Chaos Monkeys»:

Imagine a monkey getting into a «data center» — those «farms» of servers that host all the mission-critical functions of our online activity. The monkey randomly rips out cables, breaks devices and returns whatever it gets its hands on [that is, throws around excrement]. The task of IT managers is to design the information system they are responsible for in such a way that it can operate despite these monkeys, since no one ever knows when they will show up and what they will destroy.

What it does:
Randomly shuts down instances (servers)

Goal:
Verify that the system:

  • scales
  • can self-heal
  • does not go down because of one node

Simian Army

The «Simian Army» is a set of tools developed by Netflix to test the reliability, security or fault tolerance of its Amazon Web Services infrastructure, and includes the following tools:

  • At the very top of the Simian Army hierarchy, Chaos Kong drops an entire AWS region. Although rare, the loss of an entire region does happen, and Chaos Kong simulates the system's response to and recovery from such an event.
  • Chaos Gorilla takes out an entire Amazon «availability zone» (one or more entire data centers serving a geographic region).

Latency Monkey

What it does:
Adds delays (latency)

Goal:
Verify:

  • timeouts
  • retry logic
  • UX degradation

Exception Monkey

What it does:
Generates errors (exceptions)

Goal:

  • error handling
  • fallback logic
  • circuit breakers

Chaos Gorilla

What it does:
Shuts down an entire data center / availability zone

Chaos Kong

Goal:
Verification of:

  • multi-region architecture
  • disaster recovery

What it does:
Takes out an entire region

Goal:

  • global fault tolerance
  • failover between regions

Security Monkey

What it does:
Looks for vulnerabilities (for example, open ports)

Goal:

  • infrastructure security
  • correctness of IAM/ACL

Conformity Monkey

What it does:
Removes unused resources

Goal:

  • reducing clutter
  • configuration control

Other related concepts

«Chaos Day» at Voyages-sncf.com in 2017 turned failure simulation at the pre-production stage into a game, which was presented at the DevOps REX 2017 conference. Steadybit, founded in 2019, popularized chaos at the pre-production stage and reliability engineering. Its open Reliability Hub extends Steadybit's capabilities.

Proofdock can inject infrastructure, platform and application failures into Microsoft Azure DevOps. Gremlin is a «failure as a service» platform. Facebook's Project Storm simulates data-center outages to improve resilience to natural disasters.

See also

  • data redundancy
  • Error detection and correction
  • Rapid failure response system
  • The «fail fast» principle (in business) — a related topic in business management.
  • Move back and forth
  • Fault injection
  • Fault tolerance
  • Fault-tolerant computer system
  • Graceful degradation (networking)
  • Resilience (network)
  • Reliability (computer science)
  • Fuzzing
created: 2026-05-01
updated: 2026-05-11
1



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Quality Assurance"

Terms: Quality Assurance