Webhooks
Cheat sheet · https://pcornel.dk/topic.php?topic=5318
Answer
Webhooks are producer-initiated HTTP event deliveries that connect an authoritative source event to a consumer callback. Reliable automation assumes at-least-once delivery characteristics, verifies source authenticity, handles duplicates/retries and proves downstream processing separately from HTTP acknowledgement.
Remember
- Event occurred ≠ webhook delivered; producer filtering and delivery creation are separate boundaries.
- Webhook delivered ≠ webhook processed; HTTP acknowledgement and worker/downstream work are separate.
- 2xx acknowledgement ≠ exactly-once effect; retries, duplicates and asynchronous handling remain possible.
- Valid signature ≠ current or authorized event automatically; replay freshness and downstream policy still matter.
First checks
- Webhook endpoint health — availability
- Signature verification — authenticity
- Delivery logs on producer side — failures
Verify in this order
producer event → HTTPS POST → verify → queue → process
Where it usually breaks
A successful webhook callback proves the receiver response path for that attempt; it does not prove exactly-once processing, final downstream state or absence of missed events.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Webhooks webhook boundary map
| 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 |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5318