codecentric / chaos-monkey-spring-boot

Chaos Monkey for Spring Boot
https://codecentric.github.io/chaos-monkey-spring-boot/
Apache License 2.0
912 stars 170 forks source link
chaos chaos-engineering chaos-monkey chaos-testing chaostoolkit engineering java resilience resilience-testing spring spring-boot spring-cloud spring-cloud-netflix test-framework testing testing-tools

Apache License 2 Build Status codecov Maven Central Contributor Covenant

Open in Gitpod VS Code DevContainer

Chaos Monkey for Spring Boot

inspired by Chaos Engineering at Netflix

This project provides a Chaos Monkey for Spring Boot applications and will try to attack your running Spring Boot App.

Everything from getting started to advanced usage is explained in the Documentation for Chaos Monkey for Spring Boot

Introduction

If you're not familiar with the principles of chaos engineering yet, check out this blog post and enter the world of chaos engineering.

<img src="https://pbs.twimg.com/media/DhaRNO7XUAAi00i.jpg" alt="Chaos Engineering – withstanding turbulent conditions in production" width="260" height="155" border="10" />

Get familiar with the Chaos Monkey for Spring Boot in the following video, available on YouTube:

<img src="https://i.ytimg.com/vi/7sQiIR9qCdA/maxresdefault.jpg" alt="Chaos Monkey for Spring Boot" width="260" height="155" border="10" />

What is the goal of Chaos Monkey?

Inspired by PRINCIPLES OF CHAOS ENGINEERING, with a focus on Spring Boot, Chaos Monkey wants to test applications better and especially during operation.

After writing many unit and integration tests, a code coverage from 70% to 80%, this unpleasant feeling remains, how our baby behaves in production?

Many questions remain unanswered:

As you can see, there are many more questions and open topics you have to deal with.

That was the start of Chaos Monkey for Spring Boot.

How does it work?

If Spring Boot Chaos Monkey is on your classpath and activated with profile name chaos-monkey, it will automatically hook into your application.

Now you can activate watchers, which look for classes to assault. There are also runtime assaults, which attack your whole application.

Be social and communicative!

If you start to implement Chaos Engineering at your company, then you must be a very social and communicative person. Why? Because you will get to know many of your colleagues personally in a very short time when your chaos experiments strike.

Check your resilience

Are your services already resilient and can handle failures? Don´t start a chaos experiment if not!

Implement active application monitoring

Check your monitoring and check if you can see the overall state of your system. There are many great tools out there to get a pleasant feeling about your entire system.

Define steady states

Define a metric to check a steady state of your service and of course your entire system. Start small with a service that is not critical.

Do not start in production

Of course, you can start in production, but keep in mind...

The best place on earth is...production!
Josh Long

...so let's keep production as the best place on earth and look for our first experiences on another stage. If all goes well, and you're confident, run it in production.

Documentation

Documentation

Help

We are using GitHub issues to track bugs, improvements and new features (for more information see Contributions). If you have a general question on how to use Chaos Monkey for Spring Boot, please ask on Stack Overflow using the tag #spring-boot-chaos-monkey.

Contributions

Chaos Monkey is open source and welcomes contributions from everyone. The contribution guideline is where you should begin in order to best understand how to contribute to this project.

Releases

Releases