Use it when designing, operating or troubleshooting the webhook boundary around Idempotency. Keep producer event, delivery identity, source verification, acknowledgement, durable processing and downstream state separate.
Idempotency · Webhooks
Consumer design that makes repeated processing of the same webhook event converge on one intended effect.
event ID → seen? → skip or process
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
event ID → durable dedupe lookup → processing state → idempotent/transactional side effect → completion marker → duplicate acknowledgement
Healthy evidence: event identity is durable, side effects converge safely and interrupted states can be reconciled without duplicate business impact.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: in-memory only dedupe, completion marker before side effect, side effect before marker with unsafe retry or provider event ID ignored.
Step 3 Common mistakes Narrow the fault
- Processing duplicates twice.
Step 4 Where it fails Narrow the fault
Where Idempotency usually goes wrong: stable operation key, desired/current-state comparison, no-op behavior and duplicate-mutation prevention.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Idempotent handler ≠ duplicate event impossible; duplicates still occur and must be recognized or made harmless.
- HTTP idempotency ≠ business idempotency automatically; downstream systems may create repeated side effects.
- In-memory dedupe ≠ durable idempotency; process restart can forget prior events.
- Event ID stored ≠ side effect committed atomically; crash ordering can leave either duplicate risk or lost work.
- Event ID dedup store (Redis/DB) — idempotency
- Idempotent handlers (upsert) — effects
- Duplicate delivery test — verification
ReferenceWhat it is1 section · depth on demand
Core model
Consumer design that makes repeated processing of the same webhook event converge on one intended effect.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
A dedupe record shows an event identity was seen; without atomic processing semantics it does not show the side effect completed exactly once.
In depth
Webhook idempotency means processing the same event twice has no extra effect. Producers retry when they do not get a timely 2xx, and networks can duplicate requests, so receivers will see repeats.
delivery_id = request.headers["X-GitHub-Delivery"]
if seen.exists(delivery_id):
return "", 200 # already handled
seen.add(delivery_id, ttl=7*86400)
queue.enqueue(handle, request.get_json())
| Technique | Example |
|---|---|
| Store delivery/event IDs | Redis or database table with TTL |
| Idempotent actions | "Ensure VLAN exists" instead of "create VLAN" |
| Version checks | Ignore events older than current state |
Acknowledge duplicates with 2xx so the producer stops retrying.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Webhooks > Idempotency. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Idempotency webhook boundary map
Fast request/delivery, trust, processing and verification boundaries for Idempotency.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Source / delivery | Event, subscription, delivery ID and attempt metadata are attributable | Missing source event, stale subscription, wrong callback or delivery history gap |
| Trust / acknowledgement | Auth/signature and schema checks occur before safe acknowledgement | Unverified payload, slow handler, 2xx before durable receipt or replay weakness |
| Processing / proof | Durable dedupe/worker evidence matches downstream target state | Duplicate side effect, worker failure hidden by 2xx or no target reconciliation |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Deep reference
Healthy vs suspicious evidence
Output interpretation
For Idempotency, rely on structured fields and stable IDs (stable operation key, desired/current-state comparison, no-op behavior and duplicate-mutation prevention) rather than text formatted for display.