Back to results for “Concurrency”
Node.js › Event Loop & Non-blocking IO

What is the difference between concurrency and parallelism, and which one does Node.js's event loop actually provide by default?

Beginner

Answer

Concurrency means multiple tasks are in progress and making incremental progress over the same time period, potentially by interleaving execution, without necessarily running at the exact same instant. Parallelism means multiple tasks execute at literally the same instant on separate CPU cores. Node.js's single-threaded event loop provides concurrency for I/O-bound work by default (juggling many pending operations on one thread), but not true parallelism, which requires explicitly using worker threads, child processes, or the cluster module to actually utilize multiple CPU cores simultaneously.
// Concurrency: many I/O operations in flight on one thread, interleaved
Promise.all([fetchA(), fetchB(), fetchC()]); // concurrent, not parallel

// True parallelism requires worker threads or multiple processes
const worker = new Worker('./cpu-task.js'); // runs on an actual separate thread
Real-world example A team correctly explains to a new hire that their Node.js API handling thousands of simultaneous connections achieves this through concurrency on a single thread, not parallelism, and that CPU-bound work genuinely needing to run in parallel across cores requires deliberately reaching for worker threads instead.

Common follow-ups: Why is this distinction important when explaining Node.js's scalability characteristics to someone coming from a multi-threaded language background?;How does the cluster module provide a form of parallelism despite each individual worker still being single-threaded internally?