理解 GCP 云任务队列的重试参数

huangapple go评论36阅读模式
英文:

Understanding retry parameters of GCP cloud task queue

问题

GCP云任务文档没有详细解释重试参数。是否有人可以帮助理解重试参数,特别是MAX_INTERVALMIN_INTERVALMAX_DOUBLINGSMAX_RETRY_DURATION

考虑到我有一个HTTP目标,每当分派任务时都会调用它,如何决定这些参数的值应该是多少?

英文:

GCP cloud task document doesn't explain the retry parameters in much depth. Can someone help in understanding the retry parameters specifically MAX_INTERVAL, MIN_INTERVAL, MAX_DOUBLINGS and MAX_RETRY_DURATION.

Considering that I have an http target which gets invoked whenever a task is dispatched, how to decide what should be the values of these parameters?

答案1

得分: 3

那些参数是"重试参数"。这意味着它们仅在您的任务失败(或超时)时使用。

当发生错误时,Cloud Task 将等待最少时间,即MIN_INTERVAL。但这个等待时间永远不会超过MAX_INTERVAL

为什么有MAX_INTERVAL?因为在每次失败时,您可以指定"等待时间"翻倍的次数。这是MAX_DOUBLINGS参数。

而且,因为您不希望永远等待/重试,最大处理持续时间,包括重试,不能超过MAX_RETRY_DURATION

英文:

Those parameters are the "retry parameters". It means, they are used ONLY when your task fails (or timeout exceeded).

When an error occurs, Cloud Task will wait a minimum of time, the MIN_INTERVAL. But this wait will never exceed the MAX_INTERVAL.

Why a MAX_INTERVAL? Because at each failure, you can specify the number of time that the "wait time" is doubled. It's the MAX_DOUBLINGS parameter.

And because you won't wait/retry eternally, the max processing duration, retries included can't exceed the MAX_RETRY_DURATION

huangapple
  • 本文由 发表于 2023年4月4日 05:34:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75923940.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定