A burst of deliveries to one webhook drains at about one per timeout

Open
#3,268 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp

Research direction

Read src/plugins/FluentCMS.Plugins.Webhooks/WebhookDeliveryJob.cs:142-151 and WebhookQueueTests.TwoDeliveriesToOneWebhookNeverRunAtOnce first. Trace how a completed delivery schedules the next waiting attempt and how attempts are ordered by event time. Done means bursts reach a fast receiver at roughly its response time per event, in event order, without waiting jobs rerunning while another attempt is in flight.

Written by the indexing model from the issue text.

Description

performance plugin type:bug

Problem

While a webhook has an attempt in flight, WebhookDeliveryJob (src/plugins/FluentCMS.Plugins.Webhooks/WebhookDeliveryJob.cs:142-151) reschedules every other attempt for it to busy.CreatedAt + Timeout plus jitter, the worst-case end of the send. WebhookQueueTests.TwoDeliveriesToOneWebhookNeverRunAtOnce asserts that wait. 1,000 events to a receiver that answers in 200 ms take hours; each round re-runs every waiting job (O(N²)) on the webhooks queue all sites share; jitter reorders events of one entry.

Proposal

Let a finished attempt wake the oldest waiting one (or keep a per-webhook FIFO drained by one job), order attempts by event time, and back off from now rather than from the worst case if polling stays.

Acceptance

  • N events to a fast receiver are delivered in about N times its response time, in event order
  • Waiting attempts do not re-run while one is in flight

Found in the code review of 17 Nov 2026 (P1).

Dominant language
C#
Stars
569
Forks
107
Avg merge
2h 49m
Merged PRs (30d)
397

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluentcms/FluentCMS

All issues in fluentcms/FluentCMS

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.