
Answer-first summary for fast verification
Answer: Retry each failure at increasing time intervals up to a maximum number of tries.
Google recommends using exponential backoff for retrying failed API requests, especially for transient errors like HTTP 503. Exponential backoff involves increasing the time interval between retries (e.g., 1s, 2s, 4s, etc.) to reduce server load and improve the chances of success. Option C aligns with this strategy by specifying increasing time intervals up to a maximum number of retries. Fixed intervals (B) or decreasing intervals (D) do not follow best practices, as they may overload the system. Batching failures (A) also does not address transient errors effectively.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You support an application that uses the Cloud Storage API. While reviewing logs, you notice multiple HTTP 503 Service Unavailable errors from the API. Currently, your application logs these errors but takes no further action. To improve success rates, you want to implement Google-recommended retry logic. What is the correct approach?
A
Retry the failures in batch after a set number of failures is logged.
B
Retry each failure at a set time interval up to a maximum number of times.
C
Retry each failure at increasing time intervals up to a maximum number of tries.
D
Retry each failure at decreasing time intervals up to a maximum number of tries.
No comments yet.