GithubHelp home page GithubHelp logo

Comments (3)

adamw avatar adamw commented on May 20, 2024 1

I'm not really sure if we should do this task, or not. There's resilience4j, but there's also akka's circuit breaker and monix's one. Maybe a resilience4j integration module makes sense: I don't know the library, and hence I don't know how hard it is to integrate with it.

But in Akka and Monix's case, you wrap any => Future[T]/Task[T]. In our case this might be the result of request.send(). I think there's nothing specific in making http calls that would require special integration. So while having an out-of-the box circuit breakers etc. in sttp would be great, I fear this might be too specialised and generally a waste of code.

Btw. - same considerations apply to a retry backend / rate-limiting backend etc.

Either way we go, we should document how to create a circuit breaker / rate-limiter etc. :) And maybe the right way to approach this is to create resilience4s or extend monix-catnap (which already has the circuit breaker)?

from sttp.

ghostbuster91 avatar ghostbuster91 commented on May 20, 2024

Since hystrix is no longer actively developed I think that we should use resilience4j-circuitbreaker from https://github.com/resilience4j/resilience4j. There are integrators for retrofit and feign so we can look how they were made.

from sttp.

adamw avatar adamw commented on May 20, 2024

Given that there's quite a lot of circuit breakers out there, and that integration with them is mostly trivial, we decided to document how to do that, instead of providing multiple integrations. See: https://sttp.readthedocs.io/en/latest/backends/custom.html#example-backend-with-circuit-breaker

from sttp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.