Beacon

Webhook-first architecture

View as Markdown

Webhook-first architecture

Why Beacon prioritizes async ingestion and queue-based processing.

explanation • updated 2026-03-15

Why webhook-first

External providers (Stripe) are source-of-truth for critical events. Beacon prioritizes fast ingestion and minimal-entry validation to avoid timeouts and event loss.

Processing flow

  1. 11) Ingestion

    Receive webhook, validate signature, and persist event.
  2. 22) Fast ack

    Return 2xx as soon as event is safely persisted.
  3. 33) Async execution

    Run business logic in workers with controlled retries.
  4. 44) Observability

    Publish final state and queue/latency/failure metrics.

Operational guarantees

  • Deduplication by event.id for provider re-delivery.
  • Safe reprocessing through business idempotency rules.
  • Failure isolation by event type and organization.

Minimum metrics

MetricObjective
Webhook ack latencykeep low and stable
Queue depthdetect backlog early
Retry ratecatch downstream degradation
Time to final statemeasure operational impact