Skip to content

[RESILIENCE] Request deduplication / idempotency keys — prevent duplicate writes on retry #235

@ElioNeto

Description

@ElioNeto

Description

When clients retry failed requests, they can create duplicate writes. Idempotency keys prevent this.

Implementation

  1. Client sends Idempotency-Key: <UUID> header with PUT requests
  2. ApexStore stores the idempotency key and its response for T seconds
  3. If the same key arrives within the TTL, return the cached response instead of executing again
  4. Cleanup expired keys periodically
  5. Configuration:
resilience:
  idempotency:
    enabled: true
    ttl_secs: 86400  # 24h
    max_keys: 100000

Labels

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions