4
Understanding Node.js Concurrency
Server-side web development is characterized by processing large volumes of HTTP requests as quickly and efficiently as possible. JavaScript is different from other languages and platforms because it has a single thread of execution, which means that HTTP requests are processed one at a time. Behind the scenes, however, there is a lot more going on, and in this chapter, I explain why the JavaScript approach is unusual, how the Node.js API performs work on behalf of JavaScript code, and how additional execution threads can be created to handle computationally intense tasks. Table 4.1 puts JavaScript concurrency in context.
Table 4.1: Putting Node.js concurrency in context
Question |
Answer |
What is it? ... |
Get Mastering Node.js Web Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.