How Node.js Fakes Multithreading

From Node.js Design Patterns by Mario Casciaro and Luciano Mammino

Node.js is one of the most popular languages for web servers, even though JavaScript is single-threaded. This might seem contradictory at first—don’t web servers need to handle simultaneous connections?

The answer is something built into the language called the reactor pattern. The reactor pattern allows Node.js to not only “multithread” but to do so in a resource-efficient way that makes it perfect for microservices.

Read the rest at the Bitovi blog.


If you enjoyed this post, please follow my RSS feed.

You can also try my apps: