Why histria or any other circuit breaker for microservice?

I am developing a microservice with spring boot and spring cloud. I learned about the hysteresis pattern and switch. I know that circuit breakers respond to an alternative answer in case of errors from the underlying microservices that I depend on to receive data. My question is, if I do not have any meaningful alternative response to the provision, why do I need a circuit breaker?

+4
source share
1 answer

Short answer: mostly Stop cascading failures in a complex distributed system.

I have no meaningful alternative answer so I need a circuit breaker?

This question is relevant only if your server serves only one REST endpoint (and one HTTP verb). But almost always, it is not. Even microservices will have a combination of several endpoints + several http verbs. You don’t want one endpoint to hang on slow microservice threads and heaps after the threads continue to wait there and eventually drop your entire application.

Read the official documentation

What is histrix? --- Hystrix is ​​designed to perform the following actions:

  • ( , )
    .
  • .
  • .
  • , .
  • , .

"Fallback and gracefully degrade when possible" - , hystrix.

+5

Source: https://habr.com/ru/post/1661140/


All Articles