14

I'm giving a try to Spring Cloud and Spring Boot. It uses Netflix OSS Applications, among them there are Ribbon and Hystrix.

Ribbon is a load balancer and comes with some features, one of them is a circuit breaker.

Hystrix is a circuit breaker application.

I don't know the difference between them both. Why use Hystrix if Ribbon already comes with a circuit breaker feature.

Can I use both applications in the same connector?

g00glen00b
  • 41,995
  • 13
  • 95
  • 133
reos
  • 8,766
  • 6
  • 28
  • 34

1 Answers1

14

I'm not aware of any circuit breaker in ribbon except integration with Hystrix. We recommend using both, ribbon for the load balancer and hystrix for the circuit breaker.

spencergibb
  • 24,471
  • 6
  • 69
  • 75
  • 1
    Thank you for your answer, this is taken from the Ribbon site. https://github.com/Netflix/ribbon/wiki/Features#built-in-failure-resiliency And https://github.com/Netflix/ribbon/wiki/Working-with-load-balancers#availabilityfilteringrule It isn't a perfect circuit braker, but it can do the job. – reos Oct 13 '15 at 21:23
  • 2
    The Circut breaker pattern involve a lot more than just checking if a server is up, and moving on to the next if it is not. Probing (sending some reqiests through), autorecovery, robust and predictable fault handling etc. – Glenn Bech Jun 08 '16 at 12:06
  • 1
    @spencergibb Is there a place where I can find how ribbon & hystrix integrate. Some load balancing `IRule`s like `AvailabilityFilteringRule` does limited circuit breaking (by load balancing the uprequests only among the servers that look alive, if none look alive, throws an exception [maybe?]). Can you explain how ribbon handles non 200 responses & cascade that info to hystrix (is it by explicitly throwing exception?) – Ashok Koyi Jan 07 '19 at 08:40
  • Could you clarify who is the "we" in "we recommend"? Thanks :) – Ivan Vučica Aug 15 '20 at 14:20