Skip to main content

Node queue priority

process.nextTick vs Promise

See why process.nextTick can run before Promise microtasks and how overusing it can starve other Node runtime phases.

Short answer

In Node.js, process.nextTick callbacks are drained before Promise microtasks, so too many nextTick callbacks can delay timers, I/O, and Promise continuations.

People search this as
process.nextTick vs PromisenextTick microtask priorityNode nextTick starvation

Common wrong assumption

Many developers treat nextTick and Promise.then as the same kind of microtask. In Node, nextTick has its own priority and can run first.

Risk in real apps

A nextTick loop can delay I/O callbacks and make a service feel stuck under load, even though the process is still running JavaScript.

Safer pattern

Use nextTick sparingly. Prefer Promise microtasks or setImmediate when other runtime phases need a chance to run.

Practice this topic

Start with the strongest case, then continue through related examples.

Search all cases