O'Reilly logo

Mastering Spring Cloud by Piotr Minkowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The tripping circuit breaker

Let me suggest an exercise for you to do. Until now, you have learned how to enable and implement circuit breakers in your application using Hystrix, in conjunction with Spring Cloud, and how to use a fallback method to take data from the cache. But you still have not used a tripped circuit breaker to prevent the failure instance from being invoked by a load balancer. Now, I would like to configure Hystrix to open the circuit after three failed call attempts if the failure percentage is greater than 30 percent and prevent the API method from being called for the next 5 seconds. The measurement time window is around 10 seconds. To meet these requirements, we have to override several default Hystrix configuration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required