Scrivio Interview library
DebuggingIntermediate5 min read · updated 13 November 2026

A platform delivers 30 million webhooks a day to 15,000 customer endpoints using a shared pool of 200 delivery workers. One large customer's endpoint started responding after 30 seconds, and webhooks for all other customers were delayed by up to 2 hours.

Why did one slow endpoint delay everyone, and how would you redesign delivery?

Each delivery to the slow endpoint held a worker for the full 30-second timeout, so that customer's volume plus retries tied up most of the 200 shared workers, and everyone else's webhooks waited behind them. Redesign with short delivery timeouts (5 to 10 seconds) and a rule that customers acknowledge quickly and process asynchronously, per-endpoint queues or partitions with a cap on concurrent deliveries per endpoint, a per-endpoint circuit breaker that pauses, probes and notifies, and per-endpoint latency and backlog monitoring exposed to customers.

Why this question is asked

A shared pool of workers is the natural first design for webhook delivery: put all deliveries in one queue and let workers take them in order. It is efficient while every endpoint behaves. The moment one large endpoint becomes slow, the pool turns into a single lane blocked by one truck, and all 15,000 customers suffer. This is a classic noisy-neighbour problem, and interviewers use it to test whether we can quantify it and then isolate tenants properly. In this answer, we will do the arithmetic of how one endpoint consumed the pool, and then fix it with shorter timeouts, per-endpoint isolation, circuit breakers and monitoring.

1How One Slow Endpoint Consumed the Pool

30 million webhooks a day is about 350 per second on average, and more at peak. With a healthy endpoint answering in 200 milliseconds, one worker can do about 5 deliveries per second, so 200 workers can do about 1,000 per second: plenty of headroom.

Now suppose the large customer receives 10 percent of all webhooks, about 35 per second, and their endpoint starts taking 30 seconds to respond, until the delivery timeout. By Little's law, deliveries in flight equal rate times duration: 35 x 30 = 1,050 concurrent deliveries would be needed for that one endpoint, and the timeouts also trigger retries, adding even more. The pool has only 200 workers, so practically every worker ends up waiting on that endpoint, processing about 200 / 30, roughly 7, deliveries per second in total. Everyone else's webhooks wait in the shared queue behind a growing backlog of the slow customer's messages. That is how a single endpoint delayed all customers by 2 hours.

Worker arithmetic with a shared pool of 200
SituationTime per deliveryPool throughputEffect
All endpoints healthy0.2 sabout 1,000 per sheadroom over 350 per s
One endpoint at 30 s, 10 percent of traffic30 s for its deliveriesabout 7 per s in totaleveryone waits behind it
After redesign: cap 10 per endpoint, 10 s timeout10 s for the slow one10 workers on it, 190 freeonly the slow customer is delayed

2Fix 1: Short Timeouts and Fast Acknowledgement

A 30-second timeout makes every slow delivery expensive. Most well-behaved receivers answer in well under a second if they do the right thing: verify the signature, store the event, return 2xx, and process later. So the platform can set a delivery timeout of 5 to 10 seconds and document the contract clearly: acknowledge within that time and process asynchronously, or the delivery counts as failed and is retried later. That alone cuts the cost of a slow endpoint by a factor of three to six, but it does not solve the problem, because a slow customer can still fill the pool, just more slowly. Isolation is the real fix.

3Fix 2: Isolate Destinations

Instead of one shared queue, deliveries are queued per destination endpoint, or per partition with endpoints hashed onto partitions. The dispatcher takes work across endpoints fairly, and, crucially, each endpoint has a cap on concurrent deliveries, for example 10. When the slow endpoint has 10 deliveries in flight, its other messages simply wait in its own queue; workers move on to other endpoints. The slow customer's webhooks are delayed, which is unavoidable since their server is slow, but the other 14,999 customers are not affected.

In practice this can be built with a queue per endpoint in a database or Redis with a scheduler picking ready endpoints, or with Kafka partitions keyed by endpoint id plus a per-endpoint concurrency limiter in the workers. The important properties are a separate backlog per endpoint and a hard limit on how many workers one endpoint can hold.

Step throughDelivery with per-endpoint isolation
  1. Event intakenew webhook messages, keyed by endpoint id
  2. Per-endpoint queuesone backlog per endpoint; slow ones grow on their own
  3. Fair schedulerround robin over endpoints with ready messages
  4. Concurrency limiterat most 10 in flight per endpoint
  5. Worker pool200 workers, 10 s timeout per delivery
  6. Circuit breaker per endpointpause after repeated failures, probe, notify

6 layers, from the top down. Step through them one at a time.

4Fix 3: A Circuit Breaker per Endpoint

If an endpoint keeps timing out or failing, continuing to send to it at full speed wastes workers and does not help the customer. A circuit breaker per endpoint tracks recent results. After, say, 20 consecutive failures or a failure rate above 50 percent over a few minutes, the circuit opens: deliveries to that endpoint pause, and messages stay queued. Every minute or so, one probe delivery is sent; if it succeeds, the circuit closes and the backlog drains, with the concurrency cap still in force so we do not flood a recovering server.

While the circuit is open, we notify the customer by email and in their dashboard that their endpoint is failing and messages are being held. If an endpoint keeps failing for days, for example 5 days, we disable it and tell the customer, so dead endpoints do not consume resources forever.

Step throughPer-endpoint circuit breaker
  1. Deliver with 10 s timeout
  2. Failures above threshold?
    YesOpen circuit: pause, keep messages queuedNoKeep delivering
  3. Probe every 60 s succeeds?
    YesClose circuit, drain backlog at capped rateNoStay open, notify customer
  4. Failing for 5 days?
    YesDisable endpoint, notifyNoKeep probing

4 steps in order. Play them, or step through them one at a time.

5Monitoring Per Endpoint, Visible to Customers

The incident lasted two hours partly because nobody saw it as one endpoint's problem. We measure delivery latency, success rate and backlog age per endpoint, and alert when the overall pool's backlog grows or when the age of the oldest message for any healthy endpoint exceeds a few minutes. The same per-endpoint data goes to customers in a dashboard: recent attempts, response codes, latency and backlog. A customer who can see that their endpoint takes 30 seconds will often fix it before we have to call them.

6Follow-up questions

How long would you keep undelivered webhooks for a paused endpoint?

Long enough to cover a realistic outage and a weekend, commonly 3 to 7 days, and state it in the documentation. During that time the messages stay queued and retries continue with exponential backoff and probes. After the retention, messages are dropped from the delivery queue but remain available through the event log or a replay API for a longer period, for example 30 days, so a customer who fixes their endpoint later can still recover the events.

Should the customer's slow endpoint get more workers instead?

No. More concurrency towards a server that is already slow usually makes it slower. The cap protects both our pool and the customer's server; if their endpoint is healthy but high-volume, the cap can be raised per customer after checking it can handle it.

7Conclusion

In this answer, we used Little's law to show that a 30-second endpoint receiving a tenth of the traffic needed more concurrency than the whole shared pool, so every worker waited on it and other customers were delayed by hours. We fixed it with 5 to 10 second timeouts and a fast-acknowledge contract, per-endpoint queues with a concurrency cap, a per-endpoint circuit breaker that pauses, probes, notifies and eventually disables, and per-endpoint monitoring shared with customers.

What to say in the interviewAbout 80 seconds aloud

Open with

With a shared pool, a slow endpoint holds a worker for the whole timeout. Here every delivery to that customer took thirty seconds. If they get, say, ten percent of our traffic, about thirty-five deliveries a second, Little's law says we would need over a thousand workers in flight just for them, plus retries.

Then, if they want more

We only have two hundred, so nearly all of them ended up waiting on that one endpoint, total throughput collapsed to a few deliveries per second, and everyone else's webhooks queued behind it for two hours. I would fix it in layers.

First, a short delivery timeout, five to ten seconds, and a documented contract that customers acknowledge quickly and process asynchronously. Second, isolation: per-endpoint queues or partitions with a cap on concurrent deliveries per endpoint, say ten. Then a slow endpoint only delays its own messages and the other workers keep serving everyone else.

Third, a circuit breaker per endpoint: after repeated failures or timeouts we pause deliveries, keep messages queued, probe every minute, notify the customer, and disable endpoints that fail for days.

And finally, monitoring per endpoint, latency, success rate and backlog age, with alerts, and the same data shown to customers in a dashboard so they can see and fix their own endpoint.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why did one slow endpoint delay everyone, and how would you redesign delivery?": https://scrivio-interview-library.netlify.app/architecture/api-design-at-scale/2efe1b2490/