google-cloud-platformgoogle-cloud-tasks

Understanding retry parameters of GCP cloud task queue


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?


Solution

  • 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