Configuring Hystrix in your application
We will cover Spring Cloud Netflix Hystix with an example we discussed in the previous chapters. We will use the same example and implement the circuit-breaker pattern, which creates a strategy against cascading failure at lower levels of services in a distributed system. We will configure Hystrix in our application of customer
and Account
microservices, as we discussed in the previous chapters:
Account
microservice: This microservice will give some basic functionality to theAccount
entity. We will call thisAccount
service fromcustomer
service to understand circuit-breaker. It will run on port6060
in localhost.Customer
microservice: This is also a REST-based microservice where we will implement the circuit-breaker using Hystrix. TheAccount
microservice will be invoked from thisCustomer
microservice and we will see the fallback path once theAccount
service is unavailable. It will run on port6161
in localhost.
Hystrix is monitoring methods that...