CONCEPT Cited by 1 source
Duplicate execution prevention¶
Definition¶
Duplicate execution prevention is the discipline of ensuring that a given event or request is processed exactly once even when multiple consumers receive it (fan-out), retries occur (at-least-once delivery), or failover triggers re-processing. It combines two complementary mechanisms:
- Distributed locking โ prevents concurrent execution of the same event by multiple handlers.
- Idempotency records โ prevents re-execution of an event that was already successfully processed (post-facto deduplication).
The distinction matters: a lock alone doesn't prevent re-execution after the lock expires; an idempotency record alone doesn't prevent concurrent execution during the first processing attempt.
Techniques¶
| Technique | Prevents | Limitation |
|---|---|---|
| Conditional write (lock) | Concurrent duplicate execution | Lock can expire if processing is slow |
| Idempotency key/token | Re-execution after completion | Doesn't prevent concurrent first attempts |
| Both combined | All duplicate execution scenarios | Requires globally-replicated store |
| Message deduplication (SQS FIFO) | Duplicate delivery | 5-minute window only; not cross-region |
Seen in¶
- sources/2026-07-22-aws-building-multi-region-resiliency-for-cloudformation-custom-resources โ DynamoDB Global Table stores both lock state AND completion records, preventing both concurrent and sequential duplicate processing of CloudFormation custom resource events (AWS Architecture Blog, 2026-07-22).