Skip to content

Implement Webhook Retry Backoff Strategy - #498

Merged
Pidoko257 merged 1 commit into
Pidoko257:mainfrom
Oby38:feat/webhook-retry-backoff-strategy
Aug 26, 2026
Merged

Implement Webhook Retry Backoff Strategy#498
Pidoko257 merged 1 commit into
Pidoko257:mainfrom
Oby38:feat/webhook-retry-backoff-strategy

Conversation

@Oby38

@Oby38 Oby38 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR implements an improved webhook retry backoff strategy to improve reliability and provider stability.

Changes

  • WebhookService (src/services/webhook.ts):

    • Added exponential backoff with jitter to prevent thundering herd when many retries happen simultaneously
    • Added max delay cap (default 30s) to prevent excessive wait times
    • Added retryable error detection: retries on 5xx server errors and 429 rate limits; doesn't retry on other 4xx client errors
    • Added configuration options: ,
    • Fixed attempt counting for non-retryable errors (early break)
    • Updated both and methods
    • Updated method with new backoff logic
  • Tests (tests/services/webhook.test.ts):

    • Added tests for non-retryable 4xx errors
    • Added tests for 429 rate limit retries
    • Added tests for 5xx server error retries
    • Added tests for max delay cap
    • Added tests for jitter factor

Issue References

Closes #367
Closes #370
Closes #369
Closes #368

- Add exponential backoff with jitter to prevent thundering herd
- Add max delay cap to prevent excessive wait times
- Add retryable error detection (retry on 5xx, 429; don't retry on 4xx)
- Add configuration options: maxDelayMs, jitterFactor
- Fix attempt counting for non-retryable errors
- Update tests for new backoff behavior

Closes Pidoko257#367
Closes Pidoko257#370
Closes Pidoko257#369
Closes Pidoko257#368
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@Oby38 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Pidoko257
Pidoko257 merged commit f4ff43c into Pidoko257:main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants