if you keep on different machines, how do you minimize network latency?
Hi Abhishek!
It's not recommended to keep MongoDB and Node.js app on the same server. In a production env, MongoDB will need more RAM for indexing. If you keep both of them on the same server, performance might be degraded. So, it' a good idea to install them on two separate machines. To minimize the latency, you can keep both of the machines in the same private network and use private IP to communicate.
Does this help?
Javascript Developer
Nikola Dašić
Back End Developer. IT and Electronics enthusiast. Node.js' husband. Meteor.js' best friend. JavaScript's brother.
No. Those should be separated. I even put them to a different cloud platform :) But in the same area, for the latency.