Skip to content

Webhook Reliability and Idempotency Guarantees #47

Description

@grantfox-oss

src/webhook.rs, src/event.rs, src/config.rs, src/metrics.rs, src/main.rs, src/cache.rs
Difficulty: Hard

Problem

Webhook delivery lacks strong idempotency guarantees. DLQ could lose data on restarts, and retry logic doesn't account for clock skew or webhook processing delays.

Current Issues

  • DLQ stored in-memory, lost on process restart
  • Idempotency key computed but not validated on webhook receiver
  • No deduplication mechanism for retried deliveries
  • Delivery ordering not guaranteed across multiple URLs
  • No way to verify successful webhook processing
  • Secret signing not explained in documentation

Required Changes

  1. Persist DLQ to Redis for durability
  2. Implement request signing with HMAC-SHA256 signature verification
  3. Add deduplication service backed by Redis with TTL
  4. Create webhook health check endpoint
  5. Document idempotency protocol and receiver expectations
  6. Implement exponential backoff with jitter for retries

Acceptance Criteria

  • At-least-once delivery guarantee verified through tests
  • Idempotent receivers can safely skip duplicate deliveries
  • DLQ recoverable after process restart
  • Webhook security guide in documentation

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions