top of page

Design Patterns | Circuit Breaker | Hystrix Implementation | Part 3

After gaining complete understanding in the first two articles: , and , it's time now to see the coding implementation.

The implementation would be much easier to understand if you've gone through the concepts already explained. Therefore, I highly recommend to go through them before proceeding further, if not yet done.

Rather than re-inventing the wheel ourselves by writing the hardcode implementation of pattern and handle the nitty grit-ties, it's always recommended to re-use libraries purposefully written by experts and thoroughly tested by teams by using them across different projects.

Today, we're going to see one such implementation using a library called Hystrix. Before, we see the video demonstration of the implementation, let's have few words about the library.

About Hystrix:

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.

A word of caution - Hystrix is no longer in active development, and is currently in maintenance mode. But, we're trying to understand here the implementation, hence using it for demonstration purpose.

Spring Cloud provides the relevant implementation with Spring Cloud Netflix Hystrix. We'll use it in our sample application. Demonstration below -

See you in the next session, till then Happy Learning! Do connect or follow me at LinkedIn, subscribe at YouTube/Facebook/Twitter! Let's keep learning today


Tech Learnings

bottom of page