Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If a request times out, you cannot tell from the timeout alone whether the server completed it. Retrying may be harmless—or it may charge twice or create a duplicate. Idempotency is the property that makes repeating one logical operation preserve its intended effect; it is not a guarantee that a request reaches the server exactly once.

What idempotent means

RFC 9110 defines an idempotent method as one where multiple identical requests have the same intended effect on the server as one request. The key phrase is intended effect: a server may still write a log entry or update revision history for each request. The responses also need not be identical.

For a simple example, “set the thermostat to 20 degrees” has the same intended result whether it is applied once or repeatedly. “Increase the temperature by 2 degrees” changes the result each time. In an API, replacing a resource with a specified representation is the kind of operation HTTP PUT is designed to express; creating a new charge may produce a fresh mutation unless the payment API recognizes a retry as the same operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

RFC 9110, Section 9.2.2, defines the property by the effect of repeated requests, not by the number of times the network delivers them.

#1 Best Overall
Sale
Pearson Computer Networking, 8E
  • brand: Pearson
  • Computer Networking, 8e

Idempotent is not the same as safe or read-only

HTTP uses safe to describe methods whose requested semantics are essentially read-only. Idempotent describes whether repeating the requested operation changes its intended effect. A method can be idempotent while still mutating data.

HTTP method Safe under RFC 9110? Idempotent under RFC 9110?
GET Yes Yes
HEAD Yes Yes
OPTIONS Yes Yes
TRACE Yes Yes
PUT No Yes
DELETE No Yes
POST No Not designated idempotent by the standard

These classifications describe HTTP semantics, not proof of how a particular application behaves. A server can have incidental effects even for a safe request—for example, logging it—and an API can define a particular POST operation as retryable if its contract and implementation make it idempotent. Conversely, a method label alone does not establish that an application has implemented the expected behavior. See RFC 9110, Section 9.2.1, and its method definitions.

Why a timeout makes retries uncertain

A timeout means the client did not receive a response in time; it does not prove that the server did not apply the request. The server might have completed the mutation and then lost the response on the way back. If the client repeats a non-idempotent operation, the server may perform the effect again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

RFC 9110 says a client may automatically repeat an idempotent request after a communication failure before it can read the response. It says a client should not automatically retry a non-idempotent request unless it knows the request’s semantics are idempotent or can determine that the original request was never applied. A proxy must not automatically retry a non-idempotent request.

A timeout, missing response, or server error by itself is not evidence that the first attempt did nothing. Before retrying a mutation, rely on the operation’s documented semantics, a deduplication mechanism, or reliable evidence that the original was not applied.

How idempotency keys make a retry recognizable

An idempotency key is a caller-generated identifier for one intended operation. The client sends the same key when retrying that operation, and the server uses it to recognize the repeat rather than treating it as a new instruction. A retry should reuse its original key; generating a new key can make the retry look like a separate operation.

The key communicates caller intent. It should not be treated simply as a hash of the request body: two requests with identical parameters can represent two legitimate actions. For example, a caller may genuinely want to create two identical resources. Amazon Builders’ Library explains why a caller-provided request identifier distinguishes “repeat this action” from “perform the same action again.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stripe’s behavior is one provider’s contract

Stripe’s API documentation, accessed October 7, 2026, describes behavior specific to Stripe: it saves the first request’s resulting status code and body for a key once endpoint execution begins, including a 500 result; it checks that repeated parameters match and errors if they do not. Validation failures and conflicts with another in-progress request do not save a result. Stripe says keys may be removed after they are at least 24 hours old, so reusing a pruned key can create a new request. Its documentation says all POST requests accept keys; GET and DELETE are idempotent by definition in Stripe’s API, and keys on those methods have no effect. These are not universal HTTP rules or a standard retention period for other providers.

What a reliable server-side design must handle

Recording a key and applying a mutation are two parts of one correctness problem. If the server records the key as complete but the mutation fails, it may incorrectly suppress a retry. If the mutation succeeds but the key record fails, a retry may duplicate the effect. The token state and the mutation therefore need coordinated handling, with concurrency controls suitable for simultaneous requests.

AWS Well-Architected guidance recommends tracking token state, using concurrency controls where needed, and passing identifiers through downstream event-driven processing so consumers can ignore duplicate messages. Its guidance also cautions against inconsistent or timestamp-based keys, storing entire payloads as tokens, and applying idempotency indiscriminately.

One deduplication boundary does not make an entire multi-service workflow happen exactly once. If a request triggers a queue message or another service call, those downstream components need their own appropriate duplicate-handling contract and coordinated state.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When is it safe to retry?

A retry is safe when repeating the same logical operation preserves the intended outcome and the API’s implementation supports that conclusion. That can be true because the operation is naturally idempotent, because the server deduplicates the operation using a stable key, or because the caller can reliably establish that the first attempt was never applied.

  • Usually safe by method semantics: repeating an HTTP PUT that sets a resource to a specified state, or a DELETE that requests removal, has the same intended effect under RFC 9110. The application still needs to honor those semantics.
  • Safe under a documented key contract: repeat the same logical request with the same key and the same parameters, within the service’s documented rules and retention period.
  • Not established by a timeout alone: the server may already have completed the operation, so blindly repeating an unprotected mutation can duplicate it.
  • Not established by identical parameters: identical payloads can express multiple legitimate actions. The client must distinguish a retry from a new operation.

How to keep retries from worsening an outage

Idempotency addresses duplicate effects; it does not make unlimited or rapid retries harmless. During an outage, many clients retrying together can add load and slow recovery. Stripe Engineering recommends exponential backoff with randomness, or jitter, to spread retries rather than sending them all in lockstep. See Stripe’s engineering discussion of idempotency.

Set a retry limit or deadline appropriate to the system, and define what happens when it is reached—such as returning an uncertain result for reconciliation instead of continuing indefinitely. There is no single retry schedule established for every API. Backoff paces traffic; it does not correct a broken deduplication design or prove a request succeeded.

Questions to check before enabling automatic retries

  • Does the operation’s documented contract say repeated requests have the same intended effect?
  • If it uses an idempotency key, is the same key reused for every retry of this logical operation?
  • Does the API require matching parameters, and how does it treat a key that is still in progress?
  • How are key state and the mutation coordinated under partial failure and concurrent requests?
  • How long are keys or results retained, and what happens after that window?
  • Do downstream services and message consumers deduplicate repeated work too?
  • What retry deadline, limit, backoff, and jitter apply?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.