Test in production
Test your microservice, in production!
Testing individual microservices
Issue an HTTP request from the testing pod to one of your services:
Chaos testing
Perform some chaos testing6
in production and see how your application reacts. After each chaos operation,
access the application’s webpage and see if anything changed. Check
the pods’ status with kubectl get pods
.
Terminate the
details
service in one pod.Check the pods status:
Note that the first pod was restarted once.
Terminate the
details
service in all its pods:Check the webpage of the application:
Bookinfo Web Application, details unavailable Note that the details section contains error messages instead of book details.
Check the pods status:
The first pod restarted twice and two other
details
pods restarted once. You may experience theError
and theCrashLoopBackOff
statuses until the pods reachRunning
status.Use Ctrl-C in the terminal to stop the infinite loop that is running to simulate traffic.
In both cases, the application did not crash. The crash in the details
microservice did not cause other microservices to fail. This behavior means you
did not have a cascading failure in this situation. Instead, you had
gradual service degradation: despite one microservice crashing, the
application could still provide useful functionality. It displayed the reviews
and the basic information about the book.
You are ready to add a new version of the reviews application7.