Am I able to make Node.JS multi-machine cluster with native cluster module or this module can be used to split work just between CPU threads on same machine?
As per docs
A single instance of Node.js runs in a single thread. To take advantage of multi-core systems, the user will sometimes want to launch a cluster of Node.js processes to handle the load.
So obviously it will work on the same machine .
But in your scenario what you can do is distribute requests to different machines using Any Proxy server Like Nginx
It distributes the request ,to the multiple backend machines. Also see Nginx Load Balancing.
http {
upstream backend {
server backend1.example.com weight=5; // machine 2 ip
server backend2.example.com; // machine 1 ip
server 192.0.0.1 backup; // machine 3 ip
}
}
And in those machine you can create clusters or better use any Cluster Manager like pm2