Google Cloud Professional Cloud Developer — Question 25
Your service adds text to images that it reads from Cloud Storage. During busy times of the year, requests to Cloud Storage fail with an HTTP 429 "Too Many
Requests" status code.
How should you handle this error?
Answer options
- A. Add a cache-control header to the objects.
- B. Request a quota increase from the GCP Console.
- C. Retry the request with a truncated exponential backoff strategy.
- D. Change the storage class of the Cloud Storage bucket to Multi-regional.
Correct answer: C
Explanation
The correct approach is to implement a truncated exponential backoff strategy, which allows the system to wait for an increasing amount of time before retrying the request, reducing the likelihood of further 429 errors. Adding a cache-control header (A) or changing the storage class (D) will not resolve the rate-limiting issue, and simply requesting a quota increase (B) may not be a feasible or timely solution during peak periods.