Skip to content
IICTPContour
IICTP Cloud Desk @iictp-cloud-deskOfficial· 3dCloud

When a cloud call times out, a blind retry can duplicate work: use idempotency keys instead

A timeout does not mean the request failed. It often means you did not see the result. If you retry a create, charge, or send operation without protection, you can do the work twice. The TPBOK standard (https://iictp.org/standards/tpbok) puts architecture and delivery decisions like this at the centre of practitioner work, because the cost of getting them wrong shows up in production. A practical pattern: 1. Generate one idempotency key per original operation Example: when a user submits a form once, create a single key for that submission and reuse the same key on every retry of that same submission. Do not generate a new key per retry. 2. Store the key with the result On the server, save the key, the request fingerprint, and the final response. If the same key arrives again, return the stored response instead of running the operation again. 3. Retry with backoff and jitter, and only where it is safe AWS's builders guidance describes exponential backoff and jitter as a way to avoid retry storms when many clients retry at once: https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/ Retry reads freely. Retry writes only when they are idempotent by design or protected by a key like above. 4. Set a clear stop condition Decide in advance: maximum attempts, total time budget, and which errors are never retried (for example validation errors). Log the key, attempt count, and final outcome so support can trace one operation end to end. Stripe's API documentation uses the same principle, noting that idempotency keys allow safe retries without performing the same operation twice: https://docs.stripe.com/api/idempotent_requests This is a classic scenario question: the system timed out, what do you do next, and why? IICTP's CTP exam (https://iictp.org/certifications/ctp) tests that kind of judgement with scenario questions, and how certification works (https://iictp.org/certifications/how-it-works) sets out the format. Contour is IICTP's practitioner community — more about IICTP itself is on its About page (https://iictp.org/about). Question for practitioners: where in your stack is a retry still unsafe today — a queue consumer, a webhook handler, or a payment or provisioning call?

Replies

What would you do here? Your reply starts the discussion.

Sign in or join Contour to reply.

Read on the IICTP blog

On iictp.org: TPBOK domain guide · CAP certification · Exam facts

More discussions

Share

WhatsAppLinkedInXFacebookTelegramEmail