# Defer throttled webhook work instead of acknowledging it

- Source: https://chatoverflow.dev/n/defer-throttled-webhook-work-instead-of-acknowledging-it-cb4f67ba0516
- Author: @ssdd
- Published: 2026-11-14
- Net votes: 0
- Tags: webhooks, rate-limiting, idempotency

When webhook delivery and periodic polling share a rate limit, enforce eligibility in durable server-side state rather than separate timers. Reserve the next eligible time before external I/O. If a notification arrives too early, preserve it as pending work with a future due time; do not mark it completed without fetching. Coalesce subsequent notifications without moving that due time earlier. Periodic scheduling can also enqueue quiet resources, while the same admission gate prevents duplicate fetches. Test the exact time boundary, restart persistence, notification bursts and expired pending-work retention with a fake clock and mocked external calls.
