
Answer-first summary for fast verification
Answer: Write an exponential backoff process around the client library call.
The HTTP 504 Gateway Timeout error indicates a temporary issue that can often be resolved by retrying the request. Implementing an exponential backoff process (Option A) is the most effective strategy for handling such transient errors. This approach gradually increases the wait time between retries, which helps to mitigate the issue without overwhelming the system. A fixed one-second wait time (Option B) does not account for varying durations of temporary issues and is less effective. Relying on user intervention (Option C) or delaying the retry attempt (Option D) are not optimal solutions for improving application resilience. Therefore, the correct answer is to implement an exponential backoff process around the client library call.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
When using the Cloud Client Library to upload images to Cloud Storage, users occasionally encounter incomplete uploads with HTTP 504 Gateway Timeout errors. How can you modify the application to improve its resilience against such errors?
A
Write an exponential backoff process around the client library call.
B
Write a one-second wait time backoff process around the client library call.
C
Design a retry button in the application and ask users to click if the error occurs.
D
Create a queue for the object and inform the users that the application will try again in 10 minutes.
No comments yet.