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 ...