Concurrency vs parallelism is a question about task structure and actual execution. A concurrent program manages multiple tasks whose progress can overlap; parallel work executes at the same time. One core can switch between tasks without doing both at once.

In Node.js, the useful next question is where the work runs: on the calling JavaScript thread, through a built-in I/O API, or in separate worker threads.

Concurrency vs parallelism: compare the execution model

The Go Blog’s distinction gives us a useful vocabulary. Concurrency describes how work is organized. Parallelism describes how computations execute.

They can coexist: independent tasks may take turns or run simultaneously when resources permit.

Term What it tells you What still needs checking
Concurrent tasks Multiple tasks can make progress over overlapping lifetimes. Where and when each task runs.
Parallel execution Computations execute at the same time. Whether this improves the whole workload.
Asynchronous interface A result can arrive after the call returns. Which mechanism performs the work.
Multithreading Multiple threads exist within a process. Whether they run together, wait or take turns.

A task is a unit of work. A thread is an execution path. A process supplies a runtime and resources.

Counting any of them does not tell you how much CPU time the application receives.

This also separates execution from data rules. PostgreSQL MVCC controls which row versions a transaction sees. It does not make arbitrary application code run on several cores.

On a single core, a task can yield while another runs. From the caller’s point of view, both are still active.

That overlap is useful even when no two instructions run at once. The operating system decides which runnable thread gets CPU time.

Two seated potters shape bowls at separate pottery wheels in a dark studio

Two potters each shape a bowl at their own wheel in this illustrated studio.

Trace two tasks in Node.js

This small example was executed on Node.js 24.19.0, Linux, on November 10, 2026. It tests ordering and thread identity, without measuring physical CPU overlap or speed. Save it as trace.mjs and run node trace.mjs:

const events = [];
async function task(name) {
  events.push(`${name}:start`);
  await Promise.resolve();
  events.push(`${name}:end`);
}
await Promise.all([task('A'), task('B')]);
console.log(events.join(', '));

The result is A:start, B:start, A:end, B:end. Both tasks begin before either finishes. Each pauses at its explicit await; neither interrupts the other’s synchronous statements.

A separate instrumented run recorded threadId zero for all four events.

Now replace the task function with this synchronous version, leaving the call and output unchanged:

function task(name) {
  events.push(`${name}:start`);
  let sum = 0;
  for (let i = 0; i < 100000; i++) sum += i;
  events.push(`${name}:end`);
  return sum;
}

The output becomes A:start, A:end, B:start, B:end. JavaScript evaluates the calls while building the array. Each loop completes before the next call starts.

Promise.all receives the two resulting numbers; it does not relocate those loops.

Both sums were 4,999,950,000 in the verification run. The full fixture also started two workers, waited for both to report ready, then released a shared gate. They returned the same sums with distinct thread IDs, 1 and 2.

Those IDs show separate workers, while the ordering shows how the calling thread handled the first two cases.

Overlapping task lifetimes still need clear state rules. The race-condition example shows why a read followed by a later write needs a defined lock scope.

The Worker Pool and worker_threads do different jobs

Node’s event-loop guide explains how the runtime uses the operating system for nonblocking I/O. Network readiness lets the event loop respond when a socket can make progress. This does not require a JavaScript worker for each request.

The libuv Worker Pool handles selected operations, including asynchronous filesystem calls, dns.lookup, and certain crypto and compression APIs. Check the exact API: “all I/O runs in worker threads” is too broad.

The separate worker_threads API lets workers execute JavaScript in parallel. It suits CPU-intensive JavaScript. Long synchronous code still occupies whichever JavaScript thread executes it.

For a conceptual companion, the Google for Developers video below presents Go Concurrency Patterns from Google I/O 2012. Its Go examples complement the distinction; the Node trace above supplies this article’s runtime evidence.

Toast rises above an indigo toaster while a seated person reads a cyan book

A slice of toast is ready while the person beside it continues reading.

Choose an approach and a measurement

Start with the slow path. Is it waiting for I/O, computing a result, or waiting behind other tasks? A trace should connect each task’s start, wait and finish to the request it serves.

  • I/O waits: start with the asynchronous API. Limit outstanding work when queues grow.
  • CPU-heavy JavaScript: compare the current path with a bounded pool of reusable workers. Include startup and message-transfer costs.
  • Shared state: define ownership and synchronization before increasing the number of tasks.
  • Resource pressure: record CPU use, queue depth, memory and request latency under the same load.

Separate cold starts from runs with workers already available. Use the same input size and time passing data in and returning results. Reusing workers avoids creation costs for each task, but messages still have costs.

Debouncing and stale-reply checks help control dispatch and accepted results. They solve a different problem from adding CPU execution capacity.

More workers also mean more resource demands. Check memory retention, including queued work, and choose monitoring signals tied to the bottleneck. Compare completed, correct work and response times under the deployment’s actual CPU limits.

Repeat the comparison with the same inputs and enough requests to expose queues. Keep error counts beside timing results: a path that drops work may appear fast.

Record the worker limit and the host’s CPU allocation so another run has a useful baseline. Change one design choice at a time.

Five coats occupy a wall rack and an extra coat hangs over a nearby chair

Every hook is occupied, with one extra coat draped over the adjacent chair.

Name the mechanism, verify the trace, then measure the result. Keep correctness, responsiveness and throughput as separate questions when choosing an execution model.