Grokking Node.js
Vote

0% completed

​

Introduction to Load Balancing and Clustering

What do the other cores of a 16-core server do while one Node.js process handles all the traffic? For your JavaScript, nothing. A Node.js process runs JavaScript on a single thread, so one process uses one core for that work. When that core is fully busy, new requests wait even though the machine has 15 idle cores.

The answer is to run several processes and spread the requests across them. Spreading requests across several copies of an application is called load balancing, and the program that does it is a load balancer. This lesson shows two ways to do it: the `cluster

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content