Best practices for handling long-running requests behind NGINX?

Hi everyone,

I’m running into an issue where some requests behind nginx take longer than expected to complete, and occasionally clients time out even though the backend eventually finishes the task. Tweaking proxy timeouts helps a bit, but it feels more like an architectural problem than a config one.

This came up in a side conversation where someone compared it to how execution-heavy tools work elsewhere, mentioning something like a high quality delta executor for android as an example of separating execution from the request lifecycle. That got me thinking more generally.

How do you usually handle long-running or execution-heavy operations behind nginx without blocking clients or risking timeouts? Do you offload to background jobs, use async callbacks, or redesign the flow entirely?

Would appreciate hearing how others approach this.