javaspringmicroservicesspring-cloudhystrix

What are Hystrix benefits over normal exception handling?


I'm really new to Hystrix topic and concept of resilient services, I was going through some course and this question came into my mind.

In Hystrix I need to define fallback method for a graceful degradation, this method is then called when circuit is broken. But I can imagine to just wrap code with try and catch and when particular exceptions appear (for timeout for instance) call fallback method in catch clause. When called service is up then normal code would be called.

Of course, with Hystrix I can additionally monitor this, but what else it gives me?. I'm pretty sure that I don't understand whole concept.


Solution

  • As you said, it can be simply wrapped under try-catch block then why choose Hystrix or some other library? What i experienced: