16.8 Summary
Throughout this chapter, you’ve learned how the Node.js platform allows you to swap out calls to external commands and even entire parts of your application from the main process to child processes or worker threads. Based on the child_process module, the cluster module enables you to start multiple server processes for Net or HTTP servers and let the operating system do the load balancing between these processes.
Finally, with promises, you’ve learned a concept that allows you to better structure asynchronous calls within your source code, making it more readable. Promises are also a means of error handling in an asynchronous context. A promise represents the positive or negative result of an asynchronous operation and can be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access