英文:
Understanding retry parameters of GCP cloud task queue
问题
GCP云任务文档没有详细解释重试参数。是否有人可以帮助理解重试参数,特别是MAX_INTERVAL、MIN_INTERVAL、MAX_DOUBLINGS和MAX_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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论