Application to create dummy load on system, it can also expose as different service endpoint URLs to mimic different micro-services to verify routing used it for testing AWS ecs autoscaling.
mvn clean package
docker build -t nirmalsuthar/resource_eater .
docker push nirmalsuthar/resource_eater:latest
docker run -it -e JAVA_OPTS='-DSERVICE_NAME=service1' --rm -p 8080:8080 --name resource_eater_cnt nirmalsuthar/resource_eater
https://localhost:8080/api/v1/service1/actuator
https://localhost:8080/api/v1/service1/info
Each iteration increase memory usage by 1 MB.
https://localhost:8081/api/v1/service1/memory?iteration=1000&pause=0
https://localhost:8080/api/v1/service1/cpu/iteration/sync?iteration=99999999
https://localhost:8080/api/v1/service1/cpu/duration/async?load=0.8&duration=3000
https://localhost:8080/api/v1/service1/exit?code=-1
Note : If JAVA_OPTS is not orivided then service1
will become unknown