Skip to content

Conversation

@bartelink
Copy link
Collaborator

@bartelink bartelink commented Nov 30, 2021

Follow-on from #126 adding support for backoffs. Such backoffs might be useful for the following scenarios:

  • if a watchdog is monitoring a stream, it can have a quick look at any time, but it ca't and shouldn't do anything useful until the timeout has been reached. In this case, it can pass an Outcome of BackOffUntil time and the HandleOk can set it (except this PR does not pass the stream name to the success handler)
  • In general, the Cosmos SDK's intrinsic backoffs work ok and add some backpressure (at the cost of occupying a thread), which avoids the next handler invocation immediately also hitting the same issue. The mechanism here of backing off on one stream is as likely to be counterproductive (generating and sending another failing request right away) as productive (switch to another stream on another node that's not yet hit the rate limit threshold this time)
  • others? I'd like to see real scenarios so the design can actually be validated. While this code is low risk and relatively efficient, I really don't want to make people read it and/or deal with breaking changes and/or maintaining it unless it's actually proven to solve a legitimate need in the best way possible

@bartelink
Copy link
Collaborator Author

@ragiano215 This is what popped out - it has a breaking change and I am not personally using it yet so I might hold off on merging

@bartelink bartelink changed the title Add backoff impl Add support for Backing off at Stream Level Nov 30, 2021
@bartelink bartelink force-pushed the stuck branch 2 times, most recently from d623c78 to 1d5f499 Compare December 6, 2021 08:43
Base automatically changed from stuck to master December 6, 2021 08:58
@bartelink bartelink force-pushed the master branch 3 times, most recently from 6fb693d to f4d40f7 Compare June 12, 2025 14:37
@bartelink bartelink force-pushed the master branch 4 times, most recently from d79310e to 6e5ad15 Compare September 23, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants