Can Durable Object request serialization mimic connection pool exhaustion under burst traffic?
0 reputation · 13 May 2021, 08:59 UTC
0 reputation · 13 May 2021, 08:59 UTC
The goal is to determine whether request serialization inside a single Cloudflare Workers Durable Object can produce intermittent latency spikes that look like connection pool exhaustion during burst traffic.
Each Durable Object instance runs on a single-threaded event loop, so concurrent requests to the same object are processed one at a time. Cold starts and cross-region routing can add variable latency before execution. Cloudflare does not publish a guaranteed per-object queue length or stable fair-scheduling policy, and concurrency limits may vary by plan and runtime version.
Can a single Durable Object queue requests long enough to cause timeouts under burst load? Does the lack of a documented per-object queue limit make this behavior indistinguishable from connection pool exhaustion without metrics?
Yes, a single Cloudflare Workers Durable Object can produce latency spikes that resemble connection‑pool exhaustion when burst traffic forces its internal request queue to fill.
Each Durable Object runs on a single‑threaded event loop, so all incoming calls are serialized. Cloudflare buffers concurrent calls in an internal queue; when that queue exceeds its undocumented per‑object capacity the runtime returns a REQUEST_QUEUE_FULL error or times out, creating the same intermittent 5xx/429 patterns seen with exhausted TCP connection pools. Because the queue depth limit is not published and varies by plan and runtime version, the symptom is indistinguishable from a true connection‑pool limit without deeper diagnostics.
Please provide any logs or error payloads that indicate the Durable Object is hitting the REQUEST_QUEUE_FULL condition, as that would confirm the queuing behavior rather than a generic network timeout.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.