logo

Webhook

A webhook is an HTTP request sent automatically from one application to another when a specific event occurs. Unlike polling-based APIs, webhooks push data to you in real time.

How Webhooks Work

  1. You register a callback URL with a service
  2. When a specific event occurs, the service sends an HTTP POST request to your URL
  3. Your application receives the payload and processes it

Webhook Challenges

Though simple in concept, webhooks present several operational challenges:

  • Delivery failures: Network issues, server downtime, or timeouts can cause missed webhooks
  • Retries: Failed deliveries need automatic retry logic with exponential backoff
  • Ordering: Webhooks may arrive out of order, especially with retries
  • Security: Validating that webhook payloads are authentic and not spoofed
  • Idempotency: Handling duplicate deliveries gracefully

Webhook Orchestration

Services like AsyncQueue solve these challenges by acting as a webhook orchestration layer:

  • Automatic retries with configurable exponential backoff
  • Delivery logging for every attempt (status code, response time, payload)
  • Timeout handling for slow endpoints
  • Result storage so you can query webhook responses via API

Example

// Create a task with a webhook callback
await asyncqueue.tasks.create({
  callbackUrl: "https://api.example.com/process",
  payload: { videoId: "abc123", format: "mp4" },
  retries: 5,
  backoff: "exponential"
});