Cloning and Load Balancing
Learn how to use cloning and decomposing by functionality to scale Node.js applications.
We'll cover the following...
Traditional, multithreaded web servers are usually only scaled horizontally when the resources assigned to a machine can’t be upgraded anymore, or when doing so would involve a higher cost than simply launching another machine.
By using multiple threads, traditional web servers can take advantage of all the processing power of a server, using all the available processors and memory. Conversely, Node.js applications, being single-threaded, are usually scaled much sooner compared to traditional web servers. Even in the context of a single machine, we need to find ways to “scale” an application in order to take advantage of all the available resources.
Note: In Node.js, vertical scaling (adding more resources to a single machine) and horizontal scaling (adding more machines to the infrastructure) are almost equivalent concepts: both, in fact, involve similar techniques to leverage all the available processing power. ...