GithubHelp home page GithubHelp logo

[Question]: Migration from about polly HOT 4 CLOSED

nuzolx avatar nuzolx commented on June 26, 2024
[Question]: Migration from

from polly.

Comments (4)

nuzolx avatar nuzolx commented on June 26, 2024

I realize that I haven't explained my actual use case.
All these methods "get" calls a service that sometimes encounters errors (sql timeouts) In this case, I want to open a circuit breaker in order to no longer be affected by service timeouts. In addition, I use a fallback to call another service.

from polly.

martincostello avatar martincostello commented on June 26, 2024

In addition, I use a fallback to call another service.

Sounds like you want to use a hedging strategy to do that.

from polly.

nuzolx avatar nuzolx commented on June 26, 2024

@martincostello It sounds interesting, especially the fallback mode, which is a bit like what I'm describing. However, the first process is always called once, every time. Like a circuit breaker, I'd like to be able to go straight into fallback for N minutes.

What I'm trying to do is to share a circuit breaker in a single controller that allows different IO calls. This's the first part and it's easy.
When the circuit is open, I want to call a fallback with a different callback per call (within my controller).
I was able to do this with api v7, but with api v8, it's harder to imagine.

from polly.

martintmk avatar martintmk commented on June 26, 2024

@nuzolx, In your V8 example try to put fallback above the circuit breaker.

You can check these docs to understand how fallback is executed:
https://www.pollydocs.org/strategies/fallback.html#fallback-after-retries

from polly.

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.