-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🚀 v3 Request: Retry Mechanism #1840
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
Can I contribute to this issue? Thanks! @ReneWerner87 |
Sure |
I was expecting to implement this. I mentioned that wanted to implemenet it in discussion section and proposed above solutions. As I remember @ReneWerner87 told me that v3 implementations hasn't been started yet when I asked it. |
there is the https://github.com/gofiber/fiber/tree/v3-beta branch Sorry @vishjain gozeloglu has the prerogative and if he has time and desire he should start with it |
Is your feature request related to a problem?
Describe the solution you'd like
I am planning to add the exponential backoff algorithm. It is a widely used retry policy. Basically, there will be 2 different functions. One is
Retry()
(orDo()
) method andNextBackoff()
(orNextTime()
) methods. Of course, there will be some helper methods likeNewBackoff()
,Reset()
. This feature will be flexible. The users can be usedRetry()
method and everything will be handled by the package. They won't consider details. They will just call the method like this:Or, maybe some users want to handle the retry part themselves. In this case, we provide all functionalities other than
Retry()
method likeReset()
,NextTime()
,Sleep()
. They use the package and call the methods like this:Also, we can add two options to check the retry count/time with
Context
andretryCount
. InContext
usage, we set timeout tocontext
and retry goes until timeout expires. ForretryCount
usage, we set number of retry step like 10, and the method retries 10 times.Describe alternatives you've considered
Regular Interval: Waits in regular period of time.
Incremental Intervals: Waiting time is increasing incrementally.
Additional context
The text was updated successfully, but these errors were encountered: