Using Jersey Client with Netflix Hystrix - No Fluff Just Stuff

Using Jersey Client with Netflix Hystrix

Posted by: Reza Rahman on January 29, 2015

There are lot of discussions about Microservice architecture. Lot of them are focused mostly on the benefits of Microservices; sometime some of the drawbacks are overlooked. I am not going to start another discussion on this but one thing is clear: as soon as you have multiple services, you should expect that some of them will fail at some point. Failure is almost inevitable!

Your infrastructure has to be designed with service failure (and degradation) in mind because you don't want all your services to be unavailable just because one of the underlying service is down (or just very slow). Your application needs to be able to isolate any potential failure and offers, at any time, some sort of graceful degradation. The overall idea is to introduce intelligence at the end point level to cope with such issue. You need a circuit breaker to avoid cascading failure. 

Netflix Hystrix is one of the popular solutions for introducing those circuit breaking capabilities. Hystrix is a latency and fault tolerance library designed to isolate points of access to remote services. In case of failure, Hystrix can stop cascading failure and enable resilience in distributed systems. Libor Kramolis from the Jersey Team has just published an article showing how to use the new Jersey Client Reactive API with Netflix Hystrix (and RxJava Observable).
Reza Rahman

About Reza Rahman

Reza is a recovering independent consultant and now Java EE evangelist at Oracle. He is the author of the popular book EJB 3 in Action. Reza is a frequent speaker at developer gatherings worldwide including JavaOne and NFJS. He is an avid contributor to community sites like JavaLobby and TSS. Reza has been a member of the Java EE, EJB and JMS expert groups. He implemented the EJB container for the Resin open source Java EE application server.

All views voiced are squarely mine alone, not Oracle's.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »