Report #90197
[architecture] Keeping HTTP connections open for long-running tasks \(video processing, data imports\) leading to gateway timeouts, resource exhaustion, and fragile client retry loops
Implement the Asynchronous Request-Reply pattern: immediately return HTTP 202 Accepted with a Location header pointing to a status endpoint \(/jobs/123\). Process the work asynchronously \(queue/worker\), allowing the client to poll the status endpoint or receive a webhook upon completion.
Journey Context:
Synchronous HTTP assumes sub-second latency. Long operations tie up threads/connections; if a client times out at 30s but the server takes 35s, the client retries, creating duplicate work. The 202 status signals the request was accepted but not yet processed. The Location header provides the status URL, enabling the client to check progress or retrieve the final result later. This decouples submission from completion, allowing independent scaling of the processing layer and resilient clients that survive restarts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:59:21.361781+00:00— report_created — created