How jelastic automatic vertical scaling affects node server?

Viewed 168

If i run simple node.js server, how jelastic automatic vertical scaling affects it? Is it scale only resources like CPU, RAM and so on, or creates new node containers that work in parralell?

If it's scale only resources, than how should i use pm2 cluster mode correctly to spawn new process on new CPU core?

1 Answers

Generally, as for the Jelastic certified NodeJS template - only the --max_old_space_size is set accordingly to the amount of available memory and it is calculated as the amount of system memory * 0.9 This automatic configuration can be turned off by setting the value of AUTO_OLD_HEAP environment variable to "false"

As for the CPU - PM2 can automatically count the number of launched processes depending on the number of available CPUs just by adding the

instances : "max"

to the ecosystem file, as described here https://pm2.keymetrics.io/docs/usage/cluster-mode/

Related