I have some basic doubts regarding node.js scaling
Problem Explanation
I am solving a problem where I have multiple devices that send data at high frequency, I need to process the data(Based on the data, some network I/O has to be done) and save it to the database.
I first designed this architecture because keeping in mind that Node.js servers can't be used when high computational work is to be done and thus added background servers here.
1) What if my computational task just involves I/O request to network? Can I use a single node.js instances if number of asynchronous requests to network is high? What is the max number of I/O threads that libuv can spawn? Does the number of internal c++ threads affect the performance of node.js server or are they independent?
2) Instead of using different hardware machines, should I deploy node.js instances on same machine using cluster module? Does it affect the performance or should I just install different machines? Utilising all the cores of cpu can be harmful for performance of server or not?
3)If the Computational work involves a lot of CPU, is there any other way to leverage node.js or is it really mandatory to deploy servers on different languages like java for my background work?