All HTTP clients should really use “Truncated Exponential Backoff” or something similar:
Exponential Backoff is an algorithm that retries requests to the server based on certain status codes in the server response. The retries exponentially increase the waiting time up to a certain threshold. The idea is that if the server is down temporarily, it is not overwhelmed with requests hitting at the same time when it comes back up.
It’s quite common to find an open source implementation in all of Google’s API libraries.
Some example implementations listed here for Google Storage calls: