Webhook Queue & Worker Concurrency Calculator (Little's Law)

Short answer: workers = ⌈λ × W / ρ⌉. At 120 req/s, 350 ms per job and a 70 % target, 42 jobs are in flight and the pool needs 60 workers, which complete 171.4 jobs/s. A 10× spike (1,200 req/s) lasting 5 minutes leaves 308,571 jobs in the queue behind that pool, and the pool needs 100 minutes to clear them; the same spike behind an 84-worker pool (50 % target) clears in 40 minutes.

Interactive Webhook Queue & Worker Concurrency Calculator (Little's Law)

Little's law · L = λW
SCENARIO PRESETS:
?Webhook events per second at peak. Read it from the provider's delivery log or your ingress metrics. Range: 1 to 10,000 req/s, step 5.
?Mean time one job takes to finish, in milliseconds, including database writes and outbound calls. Read it from your worker's job timing metrics. Range: 10 to 30,000 ms, step 10.
?Share of time you want the workers busy at peak. 70 % leaves headroom for bursts. Range: 40 to 90 %, step 5. Above 75 % the pill shows marginal, and above 90 % overloaded; these bands are a planning heuristic, not a standard.
?Minutes of downstream outage the queue must absorb. Set it to your longest expected outage. Range: 1 to 120 minutes.
LITTLE'S LAW IN-FLIGHT CONCURRENCY
L = 42 concurrent active jobs
REQUIRED WORKER THREADS / SLOTS
Concurrent workers: 60 (at 70% load)
OUTAGE BACKLOG QUEUE DEPTH
108,000 queued messages during outage
BACKLOG DRAIN TIME AFTER THE OUTAGE
35 min to clear the backlog at a surplus of 51.4 jobs/s (pool capacity 171.4 jobs/s minus the arrival rate)
REDIS / BROKER BUFFER RAM
263.7 MB broker memory for the backlog (payload only, 2.5 KB per message assumed; excludes broker structure overhead)
CALC37 · Webhook Queue & Worker…108000354260
Computed in your browser

Use the Webhook Queue & Worker Concurrency Calculator (Little's Law) to evaluate L = λ_rps · W_sec | N_workers = ⌈L / ρ_target⌉ for BullMQ / Sidekiq / Celery worker pools, Stripe/Shopify webhook receivers. With the defaults (Incoming Webhook Arrival Rate λ = 120 req/s, Mean Job Processing Duration W = 350 ms, Target Worker Pool Utilization ρ = 70 %) it returns LITTLE'S law in-flight concurrency: L = 42 concurrent active jobs. Change any input and the results update from the same equation.

Governing equationL = λ_rps · W_sec | N_workers = ⌈L / ρ_target⌉ (Little's law, L = λW)

Model assumptions

The utilization pill uses planning bands: up to 75 % comfortable, up to 90 % marginal (heuristic, not a standard). ceil(L/ρ) sizes on the average load; it is the calculator's own rule and does not model burstiness. For the probability that a job waits, use an Erlang C (M/M/c) calculation. Each queued message is assumed to take 2.5 KiB (2,560 bytes) of broker memory (payload only), a declared assumption; the memory readout is labelled MB, but it divides by 1,024, so it is MiB.

Computed in your browser. The calculator, the tables and the worked examples run the same equations.

How Long Does a Webhook Queue Take to Drain After a 10× Spike?

The calculator's outage backlog assumes the workers are not consuming anything, so the queue fills at the arrival rate. A spike is different: the pool keeps working while the queue grows by (spike rate − pool capacity) jobs per second. The table keeps the calculator's own rules, workers = ⌈λW/ρ⌉, pool capacity = workers ÷ W and drain time = backlog ÷ (capacity − λ), and applies them to a pool sized for 120 req/s at 350 ms per job, hit by 1,200 req/s for 5 minutes (300 seconds).

Queue left by a 10× spike (1,200 req/s for 5 minutes) behind a pool sized for 120 req/s at 350 ms per job, by utilization target · workers from the calculator at each target, capacity = workers ÷ W, drain time = queue ÷ (capacity − 120)
Target utilizationWorkersCapacity (jobs/s)Surplus over 120 (jobs/s)Queue at spike end (jobs)Drain time
90 %47134.314.3319,714373 min (6.2 h)
85 %50142.922.9317,143231 min (3.9 h)
80 %53151.431.4314,571167 min (2.8 h)
70 %60171.451.4308,571100 min
60 %70200.080.0300,00062 min
50 %84240.0120.0288,00040 min

Headroom sets the recovery. At a 90 % target the pool has 47 workers and only 14.3 jobs/s above the arrival rate, so the queue from the spike takes 373 minutes (6.2 hours) to clear; at a 70 % target it takes 100 minutes, and at 50 % it takes 40. At 60 workers every minute of spike costs 20 minutes of drain, so a one-minute burst clears in 20 minutes. Absorbing the spike with no queue at all would take 600 workers (the calculator at 1,200 req/s and a 70 % target), ten times the normal 60.

To check the 70 % row in the calculator, enter 120 req/s, 350 ms, 70 % and an outage window of 43 minutes: the backlog is 309,600 messages and the drain readout says 100.3 minutes. The spike leaves 308,571 jobs, which is 42.9 minutes of arrivals at 120 req/s, so 43 minutes reproduces it to within rounding.

How Long Do Webhook Senders Wait for the Acknowledgement, and Do They Retry?

The queue only helps if the handler answers inside the sender's deadline, so size the ingress against these limits and the pool against the job time W. The deadlines apply to the acknowledgement, not to the job.

Response deadline and retry policy that four webhook senders publish in their own documentation · each row read on December 1, 2026
SenderResponse deadlineRetriesDocumentation pageRead on
GitHub2XX within 10 seconds, or GitHub ends the connection and counts a failureFailed deliveries are not redelivered automatically; redeliver them by hand or with a scriptBest practices for using webhooks; Handling failed deliveriesDecember 1, 2026
Shopify200 OK within 5 seconds for the whole request, with a 1-second connection timeoutIf there is no response or an error, 8 retries over the next 4 hours; after 8 consecutive failures an Admin API subscription is deletedDeliver webhooks through HTTPSDecember 1, 2026
Slack (Events API)HTTP 2xx within three secondsUp to 3 retries: the first nearly immediately, the second after 1 minute, the third after 5 minutesEvents APIDecember 1, 2026
StripeNo number on the page: return a 2xx quickly, before any logic that might cause a timeoutLive mode: up to three days with exponential back off. Sandbox: three retries over a few hoursReceive Stripe events in your webhook endpointDecember 1, 2026

Two consequences of the arithmetic. A job time of 2,500 ms (the last column of the sizing table below) leaves only 0.5 seconds of Slack's 3-second deadline for everything else, so such a job must run from the queue and never inside the request. And retries add arrivals: for an endpoint that fails every attempt, each Slack event can arrive at most 4 times (the first delivery and 3 retries) and each Shopify event at most 9 times (the first delivery and 8 retries), so add the retry traffic to λ before sizing; the calculator does not model it.

Why Synchronous Webhook Handlers Lose Events Under Load

A webhook sender waits for a fast acknowledgement. If the handler does slow work before it responds, the sender times out and may retry or drop the event. The fix is to acknowledge quickly and queue the work. The calculator sizes the worker pool that drains that queue.

Little's law states that the average number of items in a queueing system equals the average arrival rate multiplied by the average time each item spends there: L = lambda x W (Little, 2011, section 2). It holds exactly for any observation period that starts and ends with an empty system, and it needs no assumption about how arrivals are spread or in which order jobs are served. With the default 120 events per second and 350 ms per job, L = 120 x 0.35 = 42.0 jobs are in flight on average.

Required Worker Pool Concurrency by Arrival Rate λ & Job Duration W (70% Target Utilization) — Computed via L = λ_rps · W_sec | N_workers = ⌈L / ρ_target⌉ (Little's law, L = λW) · Sources checked November 2026
Arrival Rate (req/s)W = 100 msW = 350 msW = 1,000 msW = 2,500 ms15-Min Outage Backlog
20 req/s3 workers10 workers29 workers72 workers18,000 jobs
50 req/s8 workers25 workers72 workers179 workers45,000 jobs
120 req/s18 workers60 workers172 workers429 workers108,000 jobs
250 req/s36 workers125 workers358 workers893 workers225,000 jobs
500 req/s72 workers250 workers715 workers1786 workers450,000 jobs
1000 req/s143 workers500 workers1429 workers3572 workers900,000 jobs

How Many Workers Does the Queue Need, and How Much Memory Does an Outage Backlog Take?

The workers needed for a target utilization rho are ceil(L / rho). At rho = 70 % the default needs ceil(42 / 0.70) = 60 workers, and the actual utilization is 70.0 %. A pool can only drain a queue if its capacity is above the arrival rate, which means rho below 1, so the default keeps 30 % headroom for bursts. Dividing the average load by a target utilization is also how practitioners do a rough-cut sizing with Little's law (Little, 2011, section 4.2). ceil(L / rho) sizes the pool on the average load; it is the calculator's own rule and does not model burstiness. For the probability that a job waits, use an Erlang C (M/M/c) calculation.

During a downstream outage the queue keeps filling at lambda x 60 x buffer_min messages. A 15-minute outage at 120 events per second queues 108,000 messages. The calculator assumes each message takes 2.5 KiB (2,560 bytes), a declared payload assumption rather than a measured value, so the broker needs 108,000 x 2.5 / 1024 = 263.7 MiB of memory. The readout above shows the same number with the label MB; it divides by 1,024, so it is MiB.

Impact of Target Utilization ρ on Worker Headroom at 120 req/s, 350 ms Processing Time — Computed via L = λ_rps · W_sec | N_workers = ⌈L / ρ_target⌉ (Little's law, L = λW) · Sources checked November 2026
Target UtilizationIn-Flight Jobs (L)Provisioned WorkersSpare Surge Capacity
50%42.084 workers+42 slots
60%42.070 workers+28 slots
70%42.060 workers+18 slots
80%42.053 workers+11 slots
85%42.050 workers+8 slots
90%42.047 workers+5 slots

What Does a Slow ERP Sync Cost, and What Does a Flash Sale Cost?

A slow ERP sync. A shop pushes 50 events per second into an ERP that takes 1 second per job. That keeps 50 jobs in flight, so a 70 % target needs 72 workers and runs them at 69.4 %. If the ERP stops for 15 minutes the queue holds 45,000 messages, which need 109.9 MiB of broker memory at 2.5 KiB each. The pool completes 72.0 jobs/s against 50 arriving, and clears the backlog in 34.1 minutes after the ERP returns. Related in the Cloud, API, LLM & Automation Hub: API Rate Limit, Token Bucket & Backoff Calculator and PostgreSQL Memory Tuning & PgBouncer Pool Calculator.

A flash sale. At 300 events per second and 800 ms per job, 240 jobs are in flight; a 65 % target needs 370 workers, which run at 64.9 %. A 30-minute outage downstream queues 540,000 messages, 1,318.4 MiB (1.29 GiB; the readout rounds it to 1.3 GB) at 2.5 KiB each. The pool completes 462.5 jobs/s against 300 arriving, so the surplus of 162.5 jobs/s takes 55.4 minutes to clear the backlog. You can compare these limits with other calculators in the Engineering Studio.

How Long Does the Backlog Take to Clear, and What Should the Ingress Do?

The drain output gives the recovery time: the default pool of 60 workers at 350 ms completes about 171 jobs per second against 120 arriving, a surplus of about 51 jobs per second, so the 108,000-message backlog clears in about 35 minutes. The ingress handler should verify the signature on the raw body, check the event ID for duplicates, enqueue the event and return HTTP 202 Accepted, and do nothing else. Signed payloads and bearer tokens add bytes to every request: see the JWT size and header overhead calculator.

Sources

  1. Little, J. D. C. (2011). Little's Law as Viewed on Its 50th Anniversary. Operations Research 59(3), 536–549 PrimaryTheorem LL.1: L = λW holds for a queueing system observed over a period that is empty at the start and at the end, with no assumption about stationarity or service order (section 2); practitioners divide the Little's-law inventory by a target utilization to size capacity (section 4.2). The paper was read in a copy hosted on a university course site; the publisher page did not open. The ceil(L/ρ) rule and the 75 % and 90 % bands are the calculator's own.
  2. GitHub Docs · Best practices for using webhooks PrimaryRespond with a 2XX within 10 seconds; queue the payload and process it in the background. Read December 1, 2026.
  3. GitHub Docs · Handling failed webhook deliveries PrimaryGitHub does not automatically redeliver failed deliveries. Read December 1, 2026.
  4. Shopify developer docs · Deliver webhooks through HTTPS PrimaryOne-second connection timeout, five-second timeout for the whole request, 8 retries over 4 hours. Read December 1, 2026.
  5. Slack developer docs · Events API PrimaryHTTP 2xx within three seconds; up to 3 retries at nearly immediately, 1 minute and 5 minutes. Read December 1, 2026.
  6. Stripe Docs · Receive Stripe events in your webhook endpoint PrimaryLive-mode retries for up to three days with exponential back off; sandbox retries three times over a few hours. Read December 1, 2026.

Method and test suite: Calculation Methodology.

Frequently Asked Questions: Webhook Queue & Worker Concurrency Calculator (Little's Law)

Why target 70 % utilization rather than 100 %?

At 100 % every worker is busy all the time, so any variation in arrivals or job times creates a queue that does not clear. The target leaves headroom for bursts.

Why does the 800 ms preset need 370 workers?

It has 300 requests per second, so L = 300 x 0.8 = 240 jobs in flight. At 65 % utilization that is 240 / 0.65 = 369.2, rounded up to 370.

Does the calculator model retries of failed jobs?

No. Retries add load on top of the arrival rate, so include them in the arrival rate or the job time before entering values.

How should the broker memory be set?

Multiply the backlog by your measured payload size and add the broker's per-message overhead; the calculator uses 2.5 KiB per message as a declared assumption, payload only.