How does nodejs do the online load balancing scheme without using mature packages? How do you do it yourself?

  node.js, question

How does nodejs do the online load balancing scheme without using mature packages? How do you do it yourself?

Lvs plus nginx plus pm2.

  1. According to the number of stone in Central Processor, you can run multiple node processes using pm2.

  2. Nginx acts as a reverse proxy to the node program port.

  3. Lvs performs load balancing and directs traffic to different physical machines.

  4. Multiple programs and machines share session and databases, etc.