Google Cloud Professional Cloud Developer — Question 213

You are using the Cloud Client Library to upload an image in your application to Cloud Storage. Users of the application report that occasionally the upload does not complete and the client library reports an HTTP 504 Gateway Timeout error. You want to make the application more resilient to errors. What changes to the application should you make?

Answer options

Correct answer: A

Explanation

Option A is correct because implementing an exponential backoff process can effectively handle intermittent errors by gradually increasing the wait time between retries, reducing server load. Options B and C provide less effective solutions, as a fixed wait time may not be sufficient for network issues, and relying on users to retry can lead to frustration. Option D introduces unnecessary complexity and delays the process without improving the resilience of the application.