commercetools / commercetools-jvm-sdk

The e-commerce SDK from commercetools running on the Java virtual machine.
https://commercetools.github.io/commercetools-jvm-sdk/apidocs/index.html
Other
62 stars 40 forks source link

Create circuite breaker for API #1630

Open acbeni opened 6 years ago

acbeni commented 6 years ago

Sometimes when badly implemented some clients try to repeatedly reconnect to our backend even though receiving same error over and over, we can protect ourselves from this by adding a circuit breaker to our API

acbeni commented 6 years ago

resilience4j seems like a promising choice https://github.com/resilience4j/resilience4j

katmatt commented 6 years ago

I once used hystrix as a circuit breaker https://github.com/Netflix/Hystrix and really liked it.

acbeni commented 6 years ago

Yep it's the most famous one but resilience4j i think is more lightweight. still its good that you mentioned it @katmatt to make a small comparative study before choosing one 👍

acbeni commented 6 years ago

After examining the choice, it seems a bit more constraining and also it means more dependencies for our API, and if a client wants it, it's a matter of creating a new decorator. i would rather let it as simple as it is right now. WDYT @katmatt ?