Cloning and load balancing
Traditional, multithreaded web servers are usually scaled only when the resources assigned to a machine cannot be upgraded any more 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. However, with a single Node.js process it is harder to do that, being single-threaded and having by default a memory limit of 1.7 GB on 64-bit machines (which needs a special command-line option called --max_old_space_size
to be increased). This means that Node.js applications are usually scaled much sooner compared to traditional web servers, even in ...
Get Node.js Design Patterns - Second Edition 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.