Decide whether another attempt is safe
How to retry transient failures only when the operation is safe to repeat, using exponential backoff with jitter, an attempt limit, and an overall deadline.
A retry needs two things: a transient failure and an operation that is safe to repeat. Temporary throttling or a brief connection interruption may clear on its own. An invalid request or missing permission won’t be fixed by resending the same request under the same conditions.
A timeout tells you the caller stopped waiting, not whether the service finished. A read without side effects is generally safe to repeat. A create request could already have succeeded, so reuse the same idempotency key if the service supports one, or verify the original outcome before sending another create request. If you can’t establish that repeating the write is safe, don’t retry it automatically.
Next up: Sort the statements on what you just read.