It is a middleware handler that will eat free memory once it is triggered based on the config file below.
# Light Chaos Monkey Memory Assault Handler Configuration.
# Enable the handler if set to true so that it will be wired in the handler chain during the startup
# Bypass the current chaos monkey middleware handler so that attacks won't be triggered.
# How many requests are to be attacked. 1 each request, 5 each 5th request is attacked
# Duration to assault memory when requested fill amount is reached in ms.
# min=1500, max=Integer.MAX_VALUE
# Time in ms between increases of memory usage.
# Fraction of one individual memory increase iteration. 1.0 equals 100 %.
# min=0.01, max = 1.0
# Final fraction of used memory by assault. 0.95 equals 95 %.
# min=0.01, max = 0.95
This handler should only be used with a Docker container with memory limitation. If you run with your desktop, it would eat your memory and render your desktop very slow.
When a request triggers this attack, the request will have no response, and the middleware handler will try to eat the free memory until out of memory.
If the server runs in a Docker container with limited memory allocated, the container will be shut down and restarted by the schedular.
In the centralized log, the following info level log statement can be found.
Chaos Monkey - I am eating free memory!
The current request will get time out or IOException depending on the timeout setup. And it should retry the same request with another server instance.
All subsequent requests should go to another instance.
The server instance should be restarted by the scheduler automatically.