When the services fail, hello Hystrix
Sometimes the infrastructure can fail, especially the network. It can cause some problems in microservices architecture because in general there are many connections between services. It means at runtime that the microservices depend on other microservices. Normally these connections are done using the REST APIs through the HTTP protocol.
It can cause a behavior called cascade failure; that is, when one part of the microservices system fails, it can trigger the other microservices failure, because of the dependencies. Let's illustrate this:
If Service Y fails, Service A and Service M potentially can fail as well.
We have a pattern to help us when this happens: the Circuit Breaker.
Hystrix in a nutshell
Hystrix
is a library that helps developers to manage interactions between services. The project is open source, maintained by the community, and is under the Netflix GitHub.
The Circuit Breaker pattern is a pattern that helps to control the system integrations...