HeadlinesBriefing favicon HeadlinesBriefing.com

The Webhook Valley Problem

Hacker News •
×

The author describes a recurring problem encountered at three different companies: building a system to synchronize data from external providers via webhooks. This system, never on a roadmap, involves subscribing to webhooks from identity providers, payment processors like Stripe, and email services to maintain a local copy of customer data.

Initially underestimated, this task quickly escalates to include signature verification, handling duplicate deliveries (at-least-once delivery), buffering events, implementing bootstrap importers, and developing reconciliation cron jobs. These workarounds, including a 3 a.m. cron job, are described as confessions of distrust in the replicated data, often discovered through customer support issues when data drifts out of sync.

Debugging becomes a complex tour across multiple dashboards and logs from different providers, each with unique configurations. The author questions the fundamental approach, realizing they are reconstructing an ordered log from unreliable notifications. The problem lies not in individual provider bugs, but in using webhooks—designed for triggering side effects—to transfer datasets, a task for which they lack essential properties like ordering and completeness. This leads to a "valley" of workarounds, including dedicated services like Svix and Hookdeck, and even AWS services, all attempting to compensate for the inherent limitations of webhooks for replication.