Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Automation Difficulty: Advanced ClaudeChatGPTCursor

Outbound Webhook Dispatcher with Backoff Design Prompt

Design the sender side of a webhook system — a dispatcher that delivers events to customer endpoints with bounded retries, exponential backoff with jitter, per-endpoint circuit breaking, and a dead-letter path — so a slow or flapping receiver cannot cause a retry storm or unbounded queue growth.

Target user
Engineers building outbound webhook or event-delivery services
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior automation engineer who once turned a single customer's 15-second timeout into a self-inflicted outage: naive immediate retries multiplied outbound traffic until the dispatcher's own queue and connection pool were exhausted. You now design outbound webhook delivery to fail politely and bounded.

I will provide:
- The event source and volume (steady rate, and peak burst per second)
- How endpoints are configured (per-customer URLs, secrets, expected response contract)
- Delivery requirements: ordering guarantees, acceptable delivery latency, and whether at-least-once with dedupe on the receiver is acceptable
- The dispatcher's runtime (queue/broker, worker model, connection-pool limits)

Your job:

1. **Delivery contract** — state the guarantee (at-least-once is the honest default) and require receivers to dedupe on a delivery ID. Define what a "successful delivery" is (2xx only) and how non-2xx, timeouts, and connection errors are classified.
2. **Retry policy** — design exponential backoff with full jitter, a capped maximum interval, and a hard cap on attempts. Show the actual schedule (e.g. attempt delays) and why immediate or fixed-interval retries cause synchronized retry storms.
3. **Per-endpoint isolation** — ensure one slow or dead endpoint cannot starve delivery to healthy endpoints (per-endpoint queues or fair scheduling, bounded concurrency per endpoint, separate connection budgets).
4. **Circuit breaking** — define open/half-open/closed states per endpoint: after N consecutive failures, stop hammering it, probe periodically, and resume only on success. Specify the thresholds and cooldowns.
5. **Timeouts and connection limits** — set connect/read timeouts and a global cap on in-flight requests so a wall of slow endpoints cannot exhaust workers, memory, or file descriptors.
6. **Dead-letter and replay** — after retries are exhausted, move the delivery to a DLQ with full context, and design a safe, rate-limited replay path that itself respects the circuit breaker.
7. **Signing and idempotency** — include a signed payload (HMAC over body + timestamp) and a stable delivery ID so receivers can verify authenticity and dedupe retries.
8. **Backpressure** — define what happens when the outbound queue grows faster than it drains: shed, spill, or apply backpressure to the producer — never retry unboundedly in memory.

Output as: the delivery contract, the retry schedule with jitter, the per-endpoint isolation and circuit-breaker design, the timeout/concurrency limits, the DLQ + replay flow, the signing/idempotency scheme, and the backpressure policy.

Require that total outbound request volume be bounded even when every endpoint is failing, that retries use jittered backoff (never a synchronized fixed interval), and that an exhausted delivery land in a DLQ rather than being dropped or retried forever.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Automation prompts & error guides

Browse every Automation prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.