Design webhook retry and backoff behaviour
29 October 2026
A webhook receiver returns errors on two delivery attempts and acknowledges the third. Those are three attempts to deliver one event. Preserve the event’s identity and log the attempts separately. A retry schedule tells you when another attempt may arrive, not whether the previous receiver already applied a business effect.
Put the sender’s contract beside your own policy
Check the actual sender’s published rules for retryable responses, timeouts, maximum attempts, retention and any supported delay hints. The receiver’s internal queue backoff governs how it processes work after taking responsibility for it. Document the two schedules separately. If the sender does not disclose its next attempt, record it as unknown rather than inventing a timestamp.
For a controlled exercise only, suppose the sender retries one minute after the first attempt and a further five minutes after the second.
| Attempt | Time, UTC | Observed receiver response in the example | Sender’s next due time under this test policy |
|---|---|---|---|
| 1 | 10:00 | Temporary error | 10:01 |
| 2 | 10:01 | Temporary error | 10:06 |
| 3 | 10:06 | Acknowledgement | None scheduled for this event. |
Use the same event identifier and source on all three rows, with distinct attempt references. Include the response time, outcome and a sanitised error category. Record the receiver’s durable processing state separately from the HTTP outcome. The CloudEvents specification uses the event’s source and ID together to distinguish events.
Test the lost-acknowledgement case
Suppose the receiver commits work for attempt two but its acknowledgement is lost. On attempt three, the receiver must be able to identify the completed event and avoid issuing the result or notification again. A lookup followed by an unguarded write can still race with another delivery. Use a durable uniqueness or idempotency mechanism that covers the business effect and record what happened to each attempt.
For a genuinely retryable internal processing failure, use a bounded local policy for delay and eventual review. For a permanent error, keep the event, failure reason and authorised replay procedure in a controlled exception queue. Verify in the test that the sender stops after its accepted acknowledgement, the receiver has one intended effect, and any remaining internal work has an owner.
Part of the Test duplicate and out-of-order PDF webhook events guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
