DEV.co
Open-Source Testing · codecentric

chaos-monkey-spring-boot

Chaos Monkey for Spring Boot is a testing framework that injects faults into running Spring Boot applications to verify resilience and failure handling. It helps teams validate that their applications can survive latency, service failures, and other production issues before they occur unexpectedly.

Source: GitHub — github.com/codecentric/chaos-monkey-spring-boot
941
GitHub stars
173
Forks
Java
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorycodecentric/chaos-monkey-spring-boot
Ownercodecentric
Primary languageJava
LicenseApache-2.0 — OSI-approved
Stars941
Forks173
Open issues15
Latest releasev4.0.0 (2026-02-06)
Last updated2026-06-29
Sourcehttps://github.com/codecentric/chaos-monkey-spring-boot

What chaos-monkey-spring-boot is

A Spring Boot library that hooks into the application lifecycle via profile activation and uses watchers and assaults to inject controlled faults (latency, exceptions, service kills) into method calls and runtime behavior. It provides REST APIs for runtime control and supports custom assault and watcher implementations.

Quickstart

Get the chaos-monkey-spring-boot source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/codecentric/chaos-monkey-spring-boot.gitcd chaos-monkey-spring-boot# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Pre-production resilience validation

Run controlled chaos experiments in staging environments to verify fallback mechanisms, circuit breakers, and retry logic work as designed before production deployment.

Microservices dependency failure testing

Simulate failures in downstream dependencies (databases, external APIs, cloud services) to ensure client-side load balancing, service discovery, and graceful degradation function correctly.

Operational readiness and monitoring verification

Validate that your monitoring, alerting, and observability systems can detect and respond to failures by intentionally triggering them in a controlled manner.

Implementation considerations

  • Activate via Spring profile (chaos-monkey) to keep chaos code isolated and prevent accidental production activation.
  • Define steady-state metrics and alert thresholds before experiments; use structured monitoring to establish baseline behavior.
  • Start with non-critical services and small blast radius; gradually increase experiment scope as confidence in resilience grows.
  • Customize watchers and assaults via configuration or code to target specific components and failure modes relevant to your architecture.
  • Integrate with deployment pipelines or use runtime REST APIs to schedule chaos experiments without application restarts.

When to avoid it — and what to weigh

  • Production use without mature monitoring — Do not deploy to production without comprehensive application and infrastructure monitoring in place; chaos experiments in production require confidence in observability.
  • Non-resilient applications — Avoid using Chaos Monkey on applications that lack basic error handling, timeouts, and circuit breakers; inject resilience patterns first, then test them.
  • Lack of organizational readiness — Chaos engineering requires communication and team coordination; do not run experiments without stakeholder alignment and documented steady-state metrics.
  • Real-time systems with strict SLAs — Applications with subsecond latency requirements or mission-critical real-time constraints may not tolerate intentional fault injection even in staging.

License & commercial use

Licensed under Apache License 2.0 (Apache-2.0), a permissive open-source license that permits commercial use, modification, and distribution with attribution and liability limitations.

Apache-2.0 allows unrestricted commercial use, including in proprietary products. No license fees or special commercial terms apply. Attribution is required; review the full license for indemnity and liability clauses before deployment.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Chaos Monkey's fault injection can disrupt application behavior; running it in production requires strict access control on the REST API and activation profiles. No security audit data provided. Ensure authentication and authorization for chaos operations. Running unauthorized chaos experiments could be mistaken for attacks or cause actual outages—restrict execution to authorized personnel and environments.

Alternatives to consider

Gremlin

Commercial SaaS platform for chaos engineering; offers broader infrastructure-level fault injection (network, CPU, disk) and managed experiment scheduling, but requires vendor dependency and ongoing subscription.

Byte Monkey / Byteman

JVM-level bytecode injection tools for fault injection; lower-level control but steeper learning curve and less Spring-specific; better for JVM-wide testing rather than application-level resilience.

Wiremock / Testcontainers

Test-focused mocking and containerized dependency simulation; integrate tightly with unit and integration tests but lack runtime fault injection in running applications; better for pre-deployment testing, not operational chaos.

Software development agency

Build on chaos-monkey-spring-boot with DEV.co software developers

Implement Chaos Monkey in your staging environment to validate fallbacks, monitor response, and build confidence before production. Start small, communicate with your team, and grow your chaos engineering practice.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

chaos-monkey-spring-boot FAQ

Can I run Chaos Monkey in production?
Technically yes (it's enabled via profile), but only if you have mature monitoring, alerting, and team coordination in place. Start in staging. The README recommends testing in non-production environments first and being "very social and communicative" with teams before running chaos in production.
Does it require code changes to my application?
Minimal. Add the dependency to your classpath and activate the chaos-monkey profile. Watchers and assaults are configured via properties or REST API; custom behavior requires implementing interfaces, but basic usage does not require code changes.
What kinds of faults can it inject?
Latency (delays), exceptions, service kills, and runtime assaults. Watchers can target Spring components (controllers, repositories, REST templates, etc.). Runtime assaults attack the whole application. Custom watchers and assaults can be implemented for specific failure modes.
How does it integrate with Spring Cloud and microservices?
Chaos Monkey is designed for Spring Boot applications. Topics indicate support for Spring Cloud and Spring Cloud Netflix (Eureka, Hystrix). It helps test client-side load balancing, service discovery, and failover in distributed systems, but each service must have the library included separately.

Software developers & web developers for hire

DEV.co helps companies turn open-source tools like chaos-monkey-spring-boot into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source testing stack.

Ready to test your Spring Boot application's resilience?

Implement Chaos Monkey in your staging environment to validate fallbacks, monitor response, and build confidence before production. Start small, communicate with your team, and grow your chaos engineering practice.