GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice question 2 of 35
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?
Full set: 265 questionsAn HTTP 429 "Too Many Requests" error indicates that the client is sending requests at too high a rate. This is a transient error, meaning the request may succeed if retried later. The officially recommended best practice for handling 429 and 5xx server errors is to retry the request using a truncated exponential backoff strategy. This approach systematically increases the waiting time between retries up to a maximum limit, preventing the client from further overwhelming the service and increasing the probability of a successful retry.
A. Add a cache-control header to the objects. This is a preventative measure to reduce requests by enabling caching, but it does not define how to handle a 429 error when it actually occurs.
B. Request a quota increase from the GCP Console. The 429 error is a rate limit, not a fixed project quota that can be increased. The solution is to manage the request rate from the client side.
D. Change the storage class of the Cloud Storage bucket to Multi-regional. Storage class determines data redundancy, availability, and cost. It has no effect on the request rate limits that trigger a 429 error. ---
1. Google Cloud Storage Documentation, "Request rate and access distribution guidelines": Under the section "Retry with backoff," the documentation explicitly states: "If you receive 429 or 5xx errors, you should retry the request using truncated exponential backoff." This directly supports implementing a backoff strategy for the specified error code.
2. Google Cloud Storage Documentation, "Error codes": The entry for the 429 Too Many Requests status code advises: "You have exceeded your request rate for a resource... You should retry with exponential backoff." This confirms the error's meaning and the correct handling procedure.
3. Google Cloud Architecture Framework, "Reliability pillar: Design to scale": In the section on handling transient failures, the framework recommends: "For transient failures, such as network timeouts or temporary unavailability of a service, implement retry logic with exponential backoff." This establishes exponential backoff as a foundational principle for building reliable cloud applications.
Keep practicing
Take the free GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice questions
- Question 1You have an application controlled by a managed instance group. When you deploy a new ver…
- Question 3You have been tasked with planning the migration of your company’s application from on-pr…
- Question 4You plan to make a simple HTML application available on the internet. This site keeps inf…
- Question 5HipLocal's APIs are showing occasional failures, but they cannot find a pattern. They wan…
- Question 6Your company has created an application that uploads a report to a Cloud Storage bucket. …
- Question 7Your data is stored in Cloud Storage buckets. Fellow developers have reported that data d…
