Enable it on the endpoint
Idempotency-Key header or in request_meta.idempotency_key. If both are present, their normalized values must match.
Install durable storage before serving
(scope, key) pair, complete it with the replayable response, and release incomplete reservations. Implement endpoint.IdempotencyStore against storage shared by every instance of the service.
Idempotent endpoints fail closed with idempotency_storage_unavailable when a reservation is required and no usable store is configured. This prevents the runtime from executing a write while falsely claiming replay safety.
Understand the default scope
For an authenticated request, the default scope combines:Know what gets replayed
HTTPAPI stores and replays only non-streaming2xx responses. A replay returns the stored status, content type, replayable headers, and body with Idempotent-Replayed: true.
- A matching completed request is replayed.
- A matching reservation still in progress returns an in-progress error.
- Reusing the key with another request fingerprint returns a conflict.
- A failed, missing, or streaming response releases the reservation.
request_meta. A retry may therefore change its idempotency-key location or response projection while remaining the same operation.
Keep records for at least the 24-hour HTTPAPI retention window. Clients must reuse the same key for the same intended operation and use a new key for a new operation.