Summary

In this chapter, we looked at ways in which Node applications can be scaled both vertically and horizontally. We learned how to use spawn on OS processes and to use fork on new Node processes. The overview of the cluster module demonstrated how easy it is to scale across cores using Node and efficiently and easily distribute client connections across workers with built-in messaging channels to the central (master) hub. We also looked at how horizontally distributed processes and servers can communicate using message queues and UDP servers and how these servers can be load balanced and proxied using Nginx or using Node modules designed for that purpose.

Scaling is not only about servers and load balancing. In the next chapter, we'll look ...

Get Deploying Node.js 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.