Google Cloud Professional Cloud Developer — Question 103
You support an application that uses the Cloud Storage API. You review the logs and discover multiple HTTP 503 Service Unavailable error responses from the
API. Your application logs the error and does not take any further action. You want to implement Google-recommended retry logic to improve success rates.
Which approach should you take?
Answer options
- 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.
Correct answer: C
Explanation
The correct answer is C because implementing an exponential backoff strategy, which increases the wait time between retries, is effective in dealing with transient errors like HTTP 503. Option A does not account for immediate retries, while B retries at fixed intervals, and D incorrectly suggests reducing the interval, which could lead to further failures.