Chaos engineering
Number of APIs: 7
This template demonstrates the workflow described in Building resilient APIs with chaos engineering.
Included in this template: * Simulate an API outage of critical internal APIs or external third-party APIs using a Qodex mock to test your fallbacks by returning a failing server response. * Shut down a container on an AWS EKS cluster (and optionally roll back the attack) using Gremlin. * Limit a container's resources by creating a CPU attack using Gremlin.
](/assets/blogs/https://i.imgur.com/UPPy3bQ.png)
Get Started
For the infrastructure attack on EKS, you will need a target. To work with a sample app, deploy Hipster Shop: Cloud-Native Microservices Demo Application on a Kubernetes cluster, and install Gremlin on your Kubernetes dashboard.
Then update the corresponding Qodex environment called chaosEngineering
with your own credentials and app information.
Environment Key | Description |
---|---|
gremlin_api_key | Use a team-level Gremlin API key |
your_deployed_app_URL | This is the URL of your deployed app |
-
CPU attack - Create CPU attack POST {{gremlin_api}}/attacks/new
-
Simulate an API outage - Unsuccessful API response GET {{mock_url}}/outage
-
Shut down a container - Get active containers GET {{gremlin_api}}/containers
-
Shut down a container - Create shutdown attack POST {{gremlin_api}}/attacks/new
-
Shut down a container - Verify app health GET {{your_deployed_app_URL}}
-
Shut down a container - Stop the attack DELETE {{gremlin_api}}/attacks/{{guid}}
-
CPU attack - Get active containers GET {{gremlin_api}}/containers