Nodejs server scaling for multiple systems?

I want to create chat servers in nodejs using express.I used a cluster module to scale the server among several cores, but how do I scale to another system?

+4
source share
3 answers

Since Node.js does not support shared memory, distributing Node.js processes on multiple machines provides the same experience as using a cluster to distribute processes across multiple cores - if your application can run as several independent processes on the same system, then it can also be distributed to run as several independent processes on multiple systems.

, ! , , , .

, , , , . , , , .

Node.js , , . :

, , , , . , , , .

+1

, , , .

, , , - .

:

1) . , .

2) , ​​ RabbitMQ/ActiveMQ ( AMQP) node , node AMQP Protocol,

0

If you use a process manager such as PM2 , it will take care of running your node application on different or identical machines, but for processing multiple machines you should look in Puppet, Chef or Unable to scale. If you are on AWS, EC2 can be configured for this automatically.

0
source

Source: https://habr.com/ru/post/1609415/


All Articles