Webhooks seem simple until a worker crashes mid-delivery, a subscriber goes down for an hour, or a payload gets tampered with in transit.

Here's what I actually built to handle that — FastAPI + PostgreSQL + Redis.

The core problems I solved:

1. Synchronous delivery blocks everything

Naive approach calls the subscriber URL inline. One slow endpoint stalls your whole ingest. Fix: return 202 Accepted immediately, persist the event, deliver async.