twelve months of thinking
featured · most cited handprint
“Idempotency keys belong at the edge, not the application. Move them into the worker layer and every retry storm becomes a non-event.”
intent · the call
Overriding the consensus to put idempotency in the application service. Pushing it to Cloudflare Workers with a 24h key store. Betting the storage cost stays under $400/month at 10× current volume, and that we eliminate at least 80% of duplicate-charge incidents within a quarter.
risk · what could go wrong
If key-store consistency lags, we double-charge customers — and the failure mode is silent until support tickets pile up. Mitigation: shadow-mode for two weeks against the existing service; alert on key-store skew above 50ms.
resolution · validated · resolved 2025-11-09
Right call. Eliminated 94% of duplicate-charge incidents in Q4 — better than the bet. Storage cost peaked at $312/month under Black Friday load (2.3× higher than predicted; the bet would still have held). One thing I underestimated: the debugging story for “missing” keys turned out harder than expected because the key-store doesn’t surface in app logs. Spent ~15 hours on observability we should have built up front.
f4a8b2c1d3e5f7a9b0c2d4e6f8a1b3c5
d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2
ct-log: entry #1,127,041
signed: ssh-ed25519 · ✓