Node.js · Senior · Question 41 of 75

Why should long-running or CPU-heavy work be moved out of the HTTP request path?

Explanation

Return 202 Accepted with a job ID and let clients poll or receive a webhook or event. Keep jobs idempotent.

Further reading

Problem with a question

Node.js · Senior · question 41

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz