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

retry: 指数退避重试策略实现 #168

Closed
flycash opened this issue Mar 14, 2023 · 1 comment · Fixed by #174
Closed

retry: 指数退避重试策略实现 #168

flycash opened this issue Mar 14, 2023 · 1 comment · Fixed by #174
Labels

Comments

@flycash
Copy link
Contributor

flycash commented Mar 14, 2023

仅限中文

设计与实现

#167 我们提供了接口设计与等时间间隔实现,那么这里要求提供一个指数退避的实现。

对于指数退避来说,用户可以设置:

  • 初始重试间隔,也就是第一次重试要等多久,而后就开始按照2的指数进行增长;
  • 最大重试间隔。指数增长是很快的,所以我们要防止这种增长导致重试间隔过长。比如说最长时间间隔是 10分钟;
  • 重试次数,0 或者负数代表无限制;

前置任务 #167

@richzw
Copy link

richzw commented Apr 4, 2023

尝试实现这个任务,PR已提,求review

@flycash flycash linked a pull request Apr 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants