DevOps & monitoring

Ankusa offers durable webhook ingestion for self-hosted stacks

James Carr released Ankusa, a containerized framework that ensures webhooks are durably stored before acknowledging providers, supporting Kafka, RabbitMQ, and HTTP sinks.

Illustration of a funnel capturing data blocks into storage crates before delivering them to a processor.
Illustration created for this article

James Carr has released Ankusa, an open-source framework designed to handle webhook ingestion with high durability and reliability. Published on GitHub in late October 2026, this tool acts as a robust intermediary between external providers like Stripe or GitHub and your internal worker services. It addresses common pain points in self-hosted environments where webhook delivery failures can lead to data inconsistency or lost events.

What happened

Ankusa functions as a dedicated ingestion layer that you deploy as a container in front of your existing application workers. Instead of pointing third-party services directly at your application endpoints, you direct them to Ankusa. The framework accepts the incoming webhook, verifies its signature, and writes it to durable storage before sending a success response to the provider. This ensures that even if your downstream workers are temporarily unavailable, the event is safely captured and will be processed later.

The system decouples ingestion from processing. Once a webhook is acknowledged and stored, Ankusa handles the delivery to your chosen sink, such as Kafka, RabbitMQ, NATS JetStream, Amazon SQS, Google Pub/Sub, or Redis. If you prefer direct HTTP delivery, it can also POST signed requests to your service. This architecture allows teams to use their existing message brokers without rewriting their consumer logic, while gaining guarantees about data persistence and retry mechanisms that simple endpoint handlers often lack.

Key details

  • Durable Acknowledgment: A 2xx response is only sent after the webhook is fsynced to disk or confirmed in a distributed log, depending on configuration.
  • Flexible Sinks: Supports delivery to major message brokers including Kafka, RabbitMQ, NATS, SQS, and Google Pub/Sub, as well as direct HTTP.
  • Verification Presets: Includes built-in HMAC verification for Stripe, GitHub, Shopify, and Slack, with support for Ed25519, RSA, and mTLS.
  • Throttling and Deduplication: Offers per-tenant and per-source throttling, plus deduplication based on provider event IDs to prevent double processing.
  • Dead-Letter Queue: Failed deliveries are moved to a dead-letter queue that can be replayed manually via the admin API.
  • Claim Check Pattern: Large payloads that exceed queue limits are stored separately and referenced by a claim check, keeping message queues efficient.

Background

Webhooks are HTTP callbacks used by services to notify your application of events, such as a successful payment or a code push. In traditional setups, your application endpoint receives the request, processes it, and responds. If your server crashes during processing or if the database is locked, the provider may retry the request, potentially causing duplicate entries or lost data if not handled carefully. Reliability depends heavily on the immediate availability of your application stack.

Ankusa introduces a write-ahead log (WAL) pattern to this flow. By separating the act of receiving the webhook from the act of processing it, the system ensures that the "receipt" of the event is durable. This is similar to how email servers store messages before delivering them to inboxes. The framework uses a batcher to group commits for efficiency and a dispatcher to manage retries independently, ensuring that a slow consumer does not block the acceptance of new events from providers.

Why it matters

For teams running self-hosted software, maintaining uptime for webhook endpoints is critical but challenging. External providers often have strict timeout windows and limited retry policies. If your infrastructure undergoes maintenance or experiences a transient spike in load, you risk missing important business events. Ankusa mitigates this risk by providing a buffer that absorbs traffic spikes and survives node failures. The guarantee that a 2xx status means the data is safely stored provides peace of mind during deployments or outages.

Additionally, the framework simplifies multi-tenancy and scaling. As your user base grows, managing webhook routes and secrets for hundreds of customers becomes complex. Ankusa allows you to define routes and verification rules via YAML or an admin API without redeploying the service. It supports fleet deployment behind a load balancer, where each node operates independently with its own storage, yet shares configuration via Redis if needed. This modular approach lets you scale ingestion capacity horizontally without changing your core application code.

What you can do

  • Evaluate your current webhook handling: Check if your current endpoints acknowledge requests before fully persisting data, which risks loss during crashes.
  • Test Ankusa locally: Use the provided Docker image to run a demo instance and point a test provider at it to observe the ingestion flow.
  • Configure durable storage: Decide between local disk fsync, dual-write to Kafka, or sink-dependent durability based on your infrastructure constraints.
  • Implement claim checks: If you handle large payloads, configure the claim check gateway to keep your message broker queues lightweight and fast.
  • Set up monitoring: Enable Prometheus metrics to track queue depth, oldest due age, and disk usage to alert on backlogs before they cause provider timeouts.
  • Plan for backups: Enable automated checkpoints to object storage to ensure you can restore state if a node’s local disk fails completely.

More news

All news