ARCHOS 525 BLUEPRINT · /d/dgm_int-unique-dedupe-store
Idempotency Store Internals (State Machine, Locks & TTL)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-unique-dedupe-store) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-unique-dedupe-store)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-unique-dedupe-store" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Idempotency Store Internals (State Machine, Locks & TTL) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Payment & Mutation APIs"]
n1_1["Idempotency Guard"]
n2a_2[("Atomic Lock Store")]
n2b_3[("Response Cache")]
n3_4["TTL Reaper Job"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Check key · HTTPS"| n1_1
n1_1 -->|"2a. Claim key · SQL"| n2a_2
n1_1 -.->|"2b. Save resp · Redis"| n2b_3
n2a_2 -->|"3a. Expire old · SQL"| n3_4
n2b_3 -->|"3b. Sync · Control"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Payment & Mutation APIsSTATELESSRetried non-idempotent POSTs
- Idempotency GuardSTATELESSExtract key + payload hash
- Atomic Lock StoreSTATEFULINSERT ON CONFLICT -> lock
- Response CacheSTATEFULReplay exact saved 200 JSON
- TTL Reaper JobSTATELESS24h-7d retention window
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Payment & Mutation APIs → Idempotency Guard (Check key)[HTTPS]
- Idempotency Guard → Atomic Lock Store (Claim key)[SQL]
- Idempotency Guard → Response Cache (Save resp)[Redis]
- Atomic Lock Store → TTL Reaper Job (Expire old)[SQL]
- Response Cache → TTL Reaper Job (Sync)[Control]
- TTL Reaper Job → Downstream & OTel (Emit /)[OTLP/API]