Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCUSS] Failsafe Roadmap #159

Open
15 of 18 tasks
jhalterman opened this issue Dec 28, 2018 · 9 comments
Open
15 of 18 tasks

[DISCUSS] Failsafe Roadmap #159

jhalterman opened this issue Dec 28, 2018 · 9 comments

Comments

@jhalterman
Copy link
Member

jhalterman commented Dec 28, 2018

This issue sketches out some of the past and future roadmap for Failsafe, and will be updated over time. Feel free to comment with suggestions.

3.x

  • Phi accrural failure detection
  • Backup requests
  • Hedged retries

3.2

  • Bulkhead

3.1

  • Rate limiter

3.0

2.2:

  • Cancellable async executions, backed by ForkJoinPool
  • Timeout policy

For 2.0:

@whiskeysierra
Copy link

  • More Policy implementations including Bulkhead, RateLimiter, and Cache

What about backup requests or hedged requests?

@jhalterman
Copy link
Member Author

jhalterman commented Dec 20, 2019

@whiskeysierra Do you have another pointer for backup requests?

I suspect both of these would be specific to Http or other client/server technologies. Do you think there's a way to write policies for these in a way that's not specific to particular technologies and external dependencies?

@whiskeysierra
Copy link

Technically it's just a different flavor of retries. Retries right now are triggered by exceptions (or unacceptable results) while backup requests are somewhat like an early retry caused by latency/delay. Can apply to anything, not just HTTP.

@jhalterman
Copy link
Member Author

Thanks - so to be clear, Riptide's backup requests are the same pattern as hedged requests?

@whiskeysierra
Copy link

Yes, backup requests and hedged requests are the same thing. Just different names.

@gelpenaddict
Copy link

Can you add a succeed on a Throwable? So that it keeps retrying if there is no exception and succeeds when you get a particular exception.

@jhalterman
Copy link
Member Author

jhalterman commented Apr 9, 2020

@gelpenaddict Yea, by default throwables are handled (treated as failures) but you can override that via handleIf to specify that you want to "handle" (retry) on certain results, else not (which means failures/exceptions will not be retried). Ex:

retryPolicy.handleIf((result, failure) -> result == someBadValue)

@timothybasanov
Copy link

timothybasanov commented Sep 30, 2021

Not a Contribution.

Not sure if I understand backup requests correctly, so I'm describing a behaviour that would be nice to have in my case:

Backup request is a bit different from a hedged one. It's more similar to an existing Fallback policy, but it starts its execution immediately, in parallel to the main request. Its results are only used when the main request fails. It may also need some retries/circuit breakers/fallbacks configured.

This is good for gradual service degradation where I can use a different and much less heavy request as a backup to the main request that may not be able to finish in time.

@jhalterman
Copy link
Member Author

@timothybasanov Can you open an issue for backup requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants