Backend
Webhooks
Push notifications between systems: signed, retried, idempotent.
What it is and why it exists
When a long job finishes or a source document changes, a webhook POSTs to a registered URL. Senders sign payloads (HMAC with a timestamp), retry with backoff, and deliver at least once; receivers verify signatures, respond fast, process asynchronously and dedupe by event ID.
Quick prototype
POST the result, ignore failures.
In production, at scale
HMAC signatures with timestamp tolerance (replay protection), retries with backoff and a dead-letter view, event IDs for dedup, a queue behind the receiver, and per-customer endpoint management.
Vendors and tools
| Svix / Hookdeck | Webhook delivery infrastructure |
|---|---|
| Stripe / GitHub webhooks | Reference designs |
On AWS: EventBridge API destinations; API Gateway + SQS receivers; Lambda function URLs.
How it fails
- Processing inline, timing out, and getting the same event five times
- No signature check
What the interviewer asks next
How do you verify a webhook?
Recompute HMAC(secret, timestamp + body) and compare in constant time, reject old timestamps, then dedupe on the event ID.